Merge branch 'master' of github.com:open-keychain/open-keychain
This commit is contained in:
@@ -59,6 +59,8 @@ public class ImportKeysList extends ArrayList<ImportKeysListEntry> {
|
|||||||
// being a little anal about the ArrayList#addAll contract here
|
// being a little anal about the ArrayList#addAll contract here
|
||||||
private boolean mergeDupes(ImportKeysListEntry incoming, ImportKeysListEntry existing) {
|
private boolean mergeDupes(ImportKeysListEntry incoming, ImportKeysListEntry existing) {
|
||||||
boolean modified = false;
|
boolean modified = false;
|
||||||
|
|
||||||
|
// if any source thinks it’s expired/revoked, it is
|
||||||
if (incoming.isRevoked()) {
|
if (incoming.isRevoked()) {
|
||||||
existing.setRevoked(true);
|
existing.setRevoked(true);
|
||||||
modified = true;
|
modified = true;
|
||||||
@@ -67,8 +69,16 @@ public class ImportKeysList extends ArrayList<ImportKeysListEntry> {
|
|||||||
existing.setExpired(true);
|
existing.setExpired(true);
|
||||||
modified = 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()) {
|
for (String origin : incoming.getOrigins()) {
|
||||||
existing.addOrigin(origin);
|
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> incomingIDs = incoming.getUserIds();
|
||||||
ArrayList<String> existingIDs = existing.getUserIds();
|
ArrayList<String> existingIDs = existing.getUserIds();
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ public class NfcActivity extends ActionBarActivity {
|
|||||||
+ "20" // INS
|
+ "20" // INS
|
||||||
+ "00" // P1
|
+ "00" // P1
|
||||||
+ "82" // P2 (PW1)
|
+ "82" // P2 (PW1)
|
||||||
+ String.format("%02d", mPin.length()) // Lc
|
+ String.format("%02x", mPin.length()) // Lc
|
||||||
+ Hex.toHexString(mPin.getBytes());
|
+ Hex.toHexString(mPin.getBytes());
|
||||||
if ( ! card(login).equals(accepted)) { // login
|
if ( ! card(login).equals(accepted)) { // login
|
||||||
toast("Wrong PIN!");
|
toast("Wrong PIN!");
|
||||||
|
|||||||
Reference in New Issue
Block a user