diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-09-27 13:52:05 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2014-09-27 13:52:05 +0200 |
commit | f22bbbd96cba818ac01ad7b7c472bfe29c31fff4 (patch) | |
tree | 38ff2e52006aff875cb1a72de5643ddf25cc0468 | |
parent | 1a7edc992588b16f96a185112e80304d6252f451 (diff) | |
parent | 1a2ec1eb328cf8aa828232a1cf66294b8a0fc77b (diff) | |
download | open-keychain-f22bbbd96cba818ac01ad7b7c472bfe29c31fff4.tar.gz open-keychain-f22bbbd96cba818ac01ad7b7c472bfe29c31fff4.tar.bz2 open-keychain-f22bbbd96cba818ac01ad7b7c472bfe29c31fff4.zip |
Merge branch 'master' of github.com:open-keychain/open-keychain
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/keyimport/ImportKeysList.java | 10 | ||||
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcActivity.java | 2 |
2 files changed, 11 insertions, 1 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(); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcActivity.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcActivity.java index fb2209d3e..7aa09e801 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcActivity.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/NfcActivity.java @@ -208,7 +208,7 @@ public class NfcActivity extends ActionBarActivity { + "20" // INS + "00" // P1 + "82" // P2 (PW1) - + String.format("%02d", mPin.length()) // Lc + + String.format("%02x", mPin.length()) // Lc + Hex.toHexString(mPin.getBytes()); if ( ! card(login).equals(accepted)) { // login toast("Wrong PIN!"); |