From 3759d74ac857ee434ec7b0f8c5dd0b371c621a93 Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Tue, 23 Sep 2014 01:32:36 +0200 Subject: add test case for duplicate keys in keyring (#870) --- .../org/sufficientlysecure/keychain/pgp/CanonicalizedSecretKey.java | 6 +++--- .../java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenKeychain/src') diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedSecretKey.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedSecretKey.java index bf28465f5..4106ab73d 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedSecretKey.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedSecretKey.java @@ -329,9 +329,9 @@ public class CanonicalizedSecretKey extends CanonicalizedPublicKey { return new UncachedSecretKey(mSecretKey); } - // HACK - public PGPSecretKey getSecretKey() { - return mSecretKey; + // HACK, for TESTING ONLY!! + PGPPrivateKey getPrivateKey () { + return mPrivateKey; } } diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java index 0a8774029..c4070e39a 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java @@ -1118,7 +1118,7 @@ public class PgpKeyOperation { pKey, flags, expiry); } - private static PGPSignature generateSubkeyBindingSignature( + static PGPSignature generateSubkeyBindingSignature( PGPPublicKey masterPublicKey, PGPPrivateKey masterPrivateKey, PGPPrivateKey subPrivateKey, PGPPublicKey pKey, int flags, long expiry) throws IOException, PGPException, SignatureException { -- cgit v1.2.3