From dfc396a44cc84556ee190418a0a5bc5752b0f148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Sun, 4 Oct 2015 23:37:03 +0200 Subject: Fix tests for min requirement of 2048 bits --- .../keychain/pgp/PgpEncryptDecryptTest.java | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java') diff --git a/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java b/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java index 4710edcba..9f2d4e015 100644 --- a/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java +++ b/OpenKeychain/src/test/java/org/sufficientlysecure/keychain/pgp/PgpEncryptDecryptTest.java @@ -77,7 +77,7 @@ public class PgpEncryptDecryptTest { static UncachedKeyRing mStaticRing1, mStaticRing2, mStaticRingInsecure; static Passphrase mKeyPhrase1 = TestingUtils.genPassphrase(true); static Passphrase mKeyPhrase2 = TestingUtils.genPassphrase(true); - static Passphrase mKeyPhraseInsecure = TestingUtils.genPassphrase(true); +// static Passphrase mKeyPhraseInsecure = TestingUtils.genPassphrase(true); static PrintStream oldShadowStream; @@ -127,24 +127,24 @@ public class PgpEncryptDecryptTest { mStaticRing2 = result.getRing(); } - { - // insecure (1024 bit) RSA key - SaveKeyringParcel parcel = new SaveKeyringParcel(); - parcel.mAddSubKeys.add(new SaveKeyringParcel.SubkeyAdd( - Algorithm.RSA, 2048, null, KeyFlags.CERTIFY_OTHER, 0L)); - parcel.mAddSubKeys.add(new SaveKeyringParcel.SubkeyAdd( - Algorithm.RSA, 2048, null, KeyFlags.SIGN_DATA, 0L)); - parcel.mAddSubKeys.add(new SaveKeyringParcel.SubkeyAdd( - Algorithm.RSA, 2048, null, KeyFlags.ENCRYPT_COMMS, 0L)); - parcel.mAddUserIds.add("eve"); - parcel.mNewUnlock = new ChangeUnlockParcel(mKeyPhraseInsecure); - - PgpEditKeyResult result = op.createSecretKeyRing(parcel); - Assert.assertTrue("initial test key creation must succeed", result.success()); - Assert.assertNotNull("initial test key creation must succeed", result.getRing()); - - mStaticRingInsecure = result.getRing(); - } +// { +// // insecure (1024 bit) RSA key +// SaveKeyringParcel parcel = new SaveKeyringParcel(); +// parcel.mAddSubKeys.add(new SaveKeyringParcel.SubkeyAdd( +// Algorithm.RSA, 1024, null, KeyFlags.CERTIFY_OTHER, 0L)); +// parcel.mAddSubKeys.add(new SaveKeyringParcel.SubkeyAdd( +// Algorithm.RSA, 1024, null, KeyFlags.SIGN_DATA, 0L)); +// parcel.mAddSubKeys.add(new SaveKeyringParcel.SubkeyAdd( +// Algorithm.RSA, 1024, null, KeyFlags.ENCRYPT_COMMS, 0L)); +// parcel.mAddUserIds.add("eve"); +// parcel.mNewUnlock = new ChangeUnlockParcel(mKeyPhraseInsecure); +// +// PgpEditKeyResult result = op.createSecretKeyRing(parcel); +// Assert.assertTrue("initial test key creation must succeed", result.success()); +// Assert.assertNotNull("initial test key creation must succeed", result.getRing()); +// +// mStaticRingInsecure = result.getRing(); +// } } -- cgit v1.2.3