diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-09-25 11:33:57 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-09-25 11:33:57 +0200 |
commit | 4f0ac61b0ed5cc135d5529e3df082f2419985bf0 (patch) | |
tree | 4cacd2c86228f4a7e27911e5de7a976f15b9724d /OpenKeychain/src/main/java/org | |
parent | 999094934ac8544c398863ea1f038946fe098791 (diff) | |
parent | 6d70e1bfd139c869c9a3eb929c7a9d3f16e7ae14 (diff) | |
download | open-keychain-4f0ac61b0ed5cc135d5529e3df082f2419985bf0.tar.gz open-keychain-4f0ac61b0ed5cc135d5529e3df082f2419985bf0.tar.bz2 open-keychain-4f0ac61b0ed5cc135d5529e3df082f2419985bf0.zip |
Merge pull request #889 from timbray/master
Fix bug where Keybase extraData gets lost when SKS wins the search race.
Diffstat (limited to 'OpenKeychain/src/main/java/org')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysList.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysList.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysList.java index a8ddd5419..02cb502d0 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysList.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysList.java @@ -59,6 +59,8 @@ public class ImportKeysList extends ArrayList<ImportKeysListEntry> { // being a little anal about the ArrayList#addAll contract here private boolean mergeDupes(ImportKeysListEntry incoming, ImportKeysListEntry existing) { boolean modified = false; + + // if any source thinks it’s expired/revoked, it is if (incoming.isRevoked()) { existing.setRevoked(true); modified = true; @@ -67,8 +69,16 @@ public class ImportKeysList extends ArrayList<ImportKeysListEntry> { existing.setExpired(true); modified = true; } + + // we’re going to want to try to fetch the key from everywhere we found it, so remember + // all the origins for (String origin : incoming.getOrigins()) { existing.addOrigin(origin); + + // to work properly, Keybase-sourced entries need to pass along the extra + if (KeybaseKeyserver.ORIGIN.equals(origin)) { + existing.setExtraData(incoming.getExtraData()); + } } ArrayList<String> incomingIDs = incoming.getUserIds(); ArrayList<String> existingIDs = existing.getUserIds(); |