diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-04-11 17:14:37 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-04-11 17:14:37 +0200 |
commit | bbd97cf8004b2de49f2b8cf3b9ea1bf82b5882d5 (patch) | |
tree | 0848057ef7b8eeff69e00e92ba5a9ffef42353ad /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java | |
parent | a9281b129c3165d4b8ebece27e6ff7927715b761 (diff) | |
download | open-keychain-bbd97cf8004b2de49f2b8cf3b9ea1bf82b5882d5.tar.gz open-keychain-bbd97cf8004b2de49f2b8cf3b9ea1bf82b5882d5.tar.bz2 open-keychain-bbd97cf8004b2de49f2b8cf3b9ea1bf82b5882d5.zip |
Remove queries from PgpKeyHelper, introduce encrypt to signer mode (not tested)
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java index 0fb28ed1c..c10dec24b 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java @@ -319,9 +319,9 @@ public class KeychainIntentService extends IntentService .symmetricEncryptionAlgorithm( Preferences.getPreferences(this).getDefaultEncryptionAlgorithm()) .signatureForceV3(Preferences.getPreferences(this).getForceV3Signatures()) - .encryptionKeyIds(encryptionKeyIds) + .encryptionMasterKeyIds(encryptionKeyIds) .symmetricPassphrase(symmetricPassphrase) - .signatureKeyId(signatureKeyId) + .signatureMasterKeyId(signatureKeyId) .signatureHashAlgorithm( Preferences.getPreferences(this).getDefaultHashAlgorithm()) .signaturePassphrase( @@ -811,8 +811,14 @@ public class KeychainIntentService extends IntentService PgpKeyOperation keyOperation = new PgpKeyOperation(new ProgressScaler(this, 0, 100, 100)); PGPPublicKeyRing publicRing = ProviderHelper.getPGPPublicKeyRing(this, pubKeyId); PGPPublicKey publicKey = publicRing.getPublicKey(pubKeyId); - PGPSecretKey certificationKey = PgpKeyHelper.getCertificationKey(this, - masterKeyId); + PGPSecretKeyRing secretKeyRing = null; + try { + secretKeyRing = ProviderHelper.getPGPSecretKeyRing(this, masterKeyId); + } catch (ProviderHelper.NotFoundException e) { + Log.e(Constants.TAG, "key not found!", e); + // TODO: throw exception here! + } + PGPSecretKey certificationKey = PgpKeyHelper.getCertificationKey(secretKeyRing); publicKey = keyOperation.certifyKey(certificationKey, publicKey, userIds, signaturePassphrase); publicRing = PGPPublicKeyRing.insertPublicKey(publicRing, publicKey); |