mirror of
https://github.com/moparisthebest/open-keychain
synced 2024-11-17 14:25:08 -05:00
merge: check fingerprints on merge operation! (this needs a testcase!)
This commit is contained in:
parent
d2b9e95c80
commit
a19784ed7e
@ -45,6 +45,7 @@ import java.io.ByteArrayOutputStream;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@ -692,7 +693,8 @@ public class UncachedKeyRing {
|
|||||||
|
|
||||||
long masterKeyId = other.getMasterKeyId();
|
long masterKeyId = other.getMasterKeyId();
|
||||||
|
|
||||||
if (getMasterKeyId() != masterKeyId) {
|
if (getMasterKeyId() != masterKeyId
|
||||||
|
|| Arrays.equals(getFingerprint(), other.getFingerprint())) {
|
||||||
log.add(LogLevel.ERROR, LogType.MSG_MG_HETEROGENEOUS, indent);
|
log.add(LogLevel.ERROR, LogType.MSG_MG_HETEROGENEOUS, indent);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -616,7 +616,7 @@
|
|||||||
<string name="msg_mg_public">Merging into public keyring %s</string>
|
<string name="msg_mg_public">Merging into public keyring %s</string>
|
||||||
<string name="msg_mg_secret">Merging into secret keyring %s</string>
|
<string name="msg_mg_secret">Merging into secret keyring %s</string>
|
||||||
<string name="msg_mg_fatal_encode">Fatal error encoding signature</string>
|
<string name="msg_mg_fatal_encode">Fatal error encoding signature</string>
|
||||||
<string name="msg_mg_heterogeneous">Tried to consolidate heterogeneous keyrings</string>
|
<string name="msg_mg_heterogeneous">Tried to merge keyrings with differing fingerprints!</string>
|
||||||
<string name="msg_mg_new_subkey">Adding new subkey %s</string>
|
<string name="msg_mg_new_subkey">Adding new subkey %s</string>
|
||||||
<string name="msg_mg_found_new">Found %s new certificates in keyring</string>
|
<string name="msg_mg_found_new">Found %s new certificates in keyring</string>
|
||||||
<string name="msg_mg_unchanged">No new certificates</string>
|
<string name="msg_mg_unchanged">No new certificates</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user