diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-03-23 00:13:18 +0100 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-03-23 00:13:18 +0100 |
commit | ff67ddc5f4bea0144fc99ba80830788abfb43893 (patch) | |
tree | 27205055b2d1090b937e14774cb047b7d715455f /OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java | |
parent | 153b99a186f514ff08f4b2a659202049f237c9fa (diff) | |
parent | 36376c49997b82ac74871c922e2f1ba75b8e214f (diff) | |
download | open-keychain-ff67ddc5f4bea0144fc99ba80830788abfb43893.tar.gz open-keychain-ff67ddc5f4bea0144fc99ba80830788abfb43893.tar.bz2 open-keychain-ff67ddc5f4bea0144fc99ba80830788abfb43893.zip |
Merge pull request #469 from honnel/save-key-workaround
Can't save key after key generation
Diffstat (limited to 'OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java')
-rw-r--r-- | OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java index 0751fa33c..e26ee3c76 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/service/KeychainIntentService.java @@ -543,7 +543,15 @@ public class KeychainIntentService extends IntentService ProviderHelper.getPGPSecretKeyRingByKeyId(this, masterKeyId), oldPassPhrase, newPassPhrase); } else { - PGPPublicKey pubkey = ProviderHelper.getPGPPublicKeyByKeyId(this, masterKeyId); + //TODO: Workaround due to ProviderHelper.getPGPPublicKeyByKeyId can not resolve public key of master-key id with uri/cursor + PGPPublicKey pubkey = null; + for(PGPSecretKey key : keys) { + PGPPublicKey tempKey = key.getPublicKey(); + if (tempKey.getKeyID() == masterKeyId) { + pubkey = tempKey; + } + } + //PGPPublicKey pubkey = ProviderHelper.getPGPPublicKeyByKeyId(this, masterKeyId); keyOperations.buildSecretKey(userIds, keys, keysUsages, keysExpiryDates, pubkey, oldPassPhrase, newPassPhrase); } |