diff options
author | Ashley Hughes <spirit.returned@gmail.com> | 2014-03-25 23:01:17 +0000 |
---|---|---|
committer | Ashley Hughes <spirit.returned@gmail.com> | 2014-03-25 23:01:17 +0000 |
commit | b77e0504aa1308da36df63038d4c05ca9aaebd71 (patch) | |
tree | c35975eb12d0b40bfc736279a79c90488193c728 /OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain | |
parent | 259a8a63a2efa587c6cbe23ae929d7f8c9478664 (diff) | |
download | open-keychain-b77e0504aa1308da36df63038d4c05ca9aaebd71.tar.gz open-keychain-b77e0504aa1308da36df63038d4c05ca9aaebd71.tar.bz2 open-keychain-b77e0504aa1308da36df63038d4c05ca9aaebd71.zip |
allow master key updates by removing old primary ID cert
Diffstat (limited to 'OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain')
-rw-r--r-- | OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java index 370f66388..9bf9ecc73 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java @@ -376,6 +376,9 @@ public class PgpKeyOperation { else remove changed IDs and add in with new certs + if the master key changed, we need to remove the primary ID certification, so we can add + the new one when it is generated, and they don't conflict + Keys remove deleted keys if a key is modified, re-sign it @@ -495,6 +498,11 @@ public class PgpKeyOperation { } } + if (saveParcel.moddedKeys[0]) { + masterPublicKey = PGPPublicKey.removeCertification(masterPublicKey, saveParcel.originalIDs.get(0)); + anyIDChanged = true; + } + //update the keyring with the new ID information if (anyIDChanged) { pKR = PGPPublicKeyRing.insertPublicKey(pKR, masterPublicKey); |