mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-12-24 07:58:50 -05:00
The current implementation of saving new generated key doesn't save the key due to the public key of master key id can not be resolved by ProviderHelper.getPGPPublicKeyByKeyId (via URI/Cursor). Workaround uses local keys-arraylist for resoving the pubkey of master key id.
This commit is contained in:
parent
1b57a10bb6
commit
4e285d9254
@ -543,7 +543,14 @@ public class KeychainIntentService extends IntentService
|
||||
ProviderHelper.getPGPSecretKeyRingByKeyId(this, masterKeyId),
|
||||
oldPassPhrase, newPassPhrase);
|
||||
} else {
|
||||
PGPPublicKey pubkey = ProviderHelper.getPGPPublicKeyByKeyId(this, masterKeyId);
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user