aboutsummaryrefslogtreecommitdiffstats
path: root/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui
diff options
context:
space:
mode:
authorAsh Hughes <ashes-iontach@hotmail.com>2013-03-15 21:34:31 +0000
committerAsh Hughes <ashes-iontach@hotmail.com>2013-03-15 21:34:31 +0000
commit9985722c6e04cbff027caa84fa01e05624e298a3 (patch)
treeb9cd4736ce53c0e3755c4a45efae4f63f9cdbdee /OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui
parentdd27d132beb47fb8878a36df3a2ccc8455c81ec2 (diff)
downloadopen-keychain-9985722c6e04cbff027caa84fa01e05624e298a3.tar.gz
open-keychain-9985722c6e04cbff027caa84fa01e05624e298a3.tar.bz2
open-keychain-9985722c6e04cbff027caa84fa01e05624e298a3.zip
correctly encrypt using symmetric key if sign box checked
Diffstat (limited to 'OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui')
-rw-r--r--OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java
index 9d73fc6e5..c6b2d196a 100644
--- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java
+++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/ui/EncryptActivity.java
@@ -678,6 +678,7 @@ public class EncryptActivity extends SherlockFragmentActivity {
long encryptionKeyIds[] = null;
int compressionId = 0;
boolean signOnly = false;
+ long mSecretKeyIdToPass = 0;
if (mMode.getCurrentView().getId() == R.id.modeSymmetric) {
Log.d(Constants.TAG, "Symmetric encryption enabled!");
@@ -685,9 +686,9 @@ public class EncryptActivity extends SherlockFragmentActivity {
if (passPhrase.length() == 0) {
passPhrase = null;
}
-
data.putString(KeychainIntentService.GENERATE_KEY_SYMMETRIC_PASSPHRASE, passPhrase);
} else {
+ mSecretKeyIdToPass = mSecretKeyId;
encryptionKeyIds = mEncryptionKeyIds;
signOnly = (mEncryptionKeyIds == null || mEncryptionKeyIds.length == 0);
}
@@ -733,7 +734,7 @@ public class EncryptActivity extends SherlockFragmentActivity {
useAsciiArmor = mAsciiArmorDemand;
}
- data.putLong(KeychainIntentService.ENCRYPT_SECRET_KEY_ID, mSecretKeyId);
+ data.putLong(KeychainIntentService.ENCRYPT_SECRET_KEY_ID, mSecretKeyIdToPass);
data.putBoolean(KeychainIntentService.ENCRYPT_USE_ASCII_AMOR, useAsciiArmor);
data.putLongArray(KeychainIntentService.ENCRYPT_ENCRYPTION_KEYS_IDS, encryptionKeyIds);
data.putInt(KeychainIntentService.ENCRYPT_COMPRESSION_ID, compressionId);