diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2014-08-14 16:27:50 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2014-08-14 16:28:03 +0200 |
commit | a19784ed7e930055a6a1d0a537f2f4f1d3ea1f21 (patch) | |
tree | 7e34a6f3b1b6db7a297ff47baad33d3bb4466a59 /OpenKeychain/src/main/java/org/sufficientlysecure | |
parent | d2b9e95c8089520411792028717ebd4b0d105764 (diff) | |
download | open-keychain-a19784ed7e930055a6a1d0a537f2f4f1d3ea1f21.tar.gz open-keychain-a19784ed7e930055a6a1d0a537f2f4f1d3ea1f21.tar.bz2 open-keychain-a19784ed7e930055a6a1d0a537f2f4f1d3ea1f21.zip |
merge: check fingerprints on merge operation! (this needs a testcase!)
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java index 5c8a85de9..20e78d7fa 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/UncachedKeyRing.java @@ -45,6 +45,7 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.util.Arrays; import java.util.Comparator; import java.util.Date; import java.util.Iterator; @@ -692,7 +693,8 @@ public class UncachedKeyRing { long masterKeyId = other.getMasterKeyId(); - if (getMasterKeyId() != masterKeyId) { + if (getMasterKeyId() != masterKeyId + || Arrays.equals(getFingerprint(), other.getFingerprint())) { log.add(LogLevel.ERROR, LogType.MSG_MG_HETEROGENEOUS, indent); return null; } |