mirror of
https://github.com/moparisthebest/open-keychain
synced 2025-02-19 20:31:52 -05:00
correctly encrypt using symmetric key if sign box checked
This commit is contained in:
parent
dd27d132be
commit
9985722c6e
@ -678,6 +678,7 @@ public class EncryptActivity extends SherlockFragmentActivity {
|
|||||||
long encryptionKeyIds[] = null;
|
long encryptionKeyIds[] = null;
|
||||||
int compressionId = 0;
|
int compressionId = 0;
|
||||||
boolean signOnly = false;
|
boolean signOnly = false;
|
||||||
|
long mSecretKeyIdToPass = 0;
|
||||||
|
|
||||||
if (mMode.getCurrentView().getId() == R.id.modeSymmetric) {
|
if (mMode.getCurrentView().getId() == R.id.modeSymmetric) {
|
||||||
Log.d(Constants.TAG, "Symmetric encryption enabled!");
|
Log.d(Constants.TAG, "Symmetric encryption enabled!");
|
||||||
@ -685,9 +686,9 @@ public class EncryptActivity extends SherlockFragmentActivity {
|
|||||||
if (passPhrase.length() == 0) {
|
if (passPhrase.length() == 0) {
|
||||||
passPhrase = null;
|
passPhrase = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.putString(KeychainIntentService.GENERATE_KEY_SYMMETRIC_PASSPHRASE, passPhrase);
|
data.putString(KeychainIntentService.GENERATE_KEY_SYMMETRIC_PASSPHRASE, passPhrase);
|
||||||
} else {
|
} else {
|
||||||
|
mSecretKeyIdToPass = mSecretKeyId;
|
||||||
encryptionKeyIds = mEncryptionKeyIds;
|
encryptionKeyIds = mEncryptionKeyIds;
|
||||||
signOnly = (mEncryptionKeyIds == null || mEncryptionKeyIds.length == 0);
|
signOnly = (mEncryptionKeyIds == null || mEncryptionKeyIds.length == 0);
|
||||||
}
|
}
|
||||||
@ -733,7 +734,7 @@ public class EncryptActivity extends SherlockFragmentActivity {
|
|||||||
useAsciiArmor = mAsciiArmorDemand;
|
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.putBoolean(KeychainIntentService.ENCRYPT_USE_ASCII_AMOR, useAsciiArmor);
|
||||||
data.putLongArray(KeychainIntentService.ENCRYPT_ENCRYPTION_KEYS_IDS, encryptionKeyIds);
|
data.putLongArray(KeychainIntentService.ENCRYPT_ENCRYPTION_KEYS_IDS, encryptionKeyIds);
|
||||||
data.putInt(KeychainIntentService.ENCRYPT_COMPRESSION_ID, compressionId);
|
data.putInt(KeychainIntentService.ENCRYPT_COMPRESSION_ID, compressionId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user