diff options
author | mostynb <mostynb@opera.com> | 2015-06-09 12:36:17 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-09 19:36:44 +0000 |
commit | 93937caf120fed43de182e475822805afdbe3001 (patch) | |
tree | 34c4a5111d83b1fd8e77d30c7c37c4f6f39da6dd | |
parent | d1c7e40e7caf9012d50e9cee8930d07451ce02d2 (diff) | |
download | chromium_src-93937caf120fed43de182e475822805afdbe3001.zip chromium_src-93937caf120fed43de182e475822805afdbe3001.tar.gz chromium_src-93937caf120fed43de182e475822805afdbe3001.tar.bz2 |
increase crypto_unittest key sizes to satisfy NSS 3.19.1
NSS version 3.19.1 added minimum key size constraints to avoid the Logjam attack:
> The minimum size of keys that NSS will generate has been raised:
> The minimum modulus size for RSA keys is now 512 bits
> The minimum modulus size for DSA keys is now 1023 bits
> The minimum modulus size for Diffie-Hellman keys is now 1023 bits
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_3.19.1_release_notes
https://bugzilla.mozilla.org/show_bug.cgi?id=1138554
BUG=490240
Review URL: https://codereview.chromium.org/1148193006
Cr-Commit-Position: refs/heads/master@{#333554}
-rw-r--r-- | crypto/nss_key_util_unittest.cc | 4 | ||||
-rw-r--r-- | crypto/rsa_private_key_unittest.cc | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/crypto/nss_key_util_unittest.cc b/crypto/nss_key_util_unittest.cc index f8de8e2..ff4d55a 100644 --- a/crypto/nss_key_util_unittest.cc +++ b/crypto/nss_key_util_unittest.cc @@ -50,7 +50,7 @@ TEST_F(NSSKeyUtilTest, FindNSSKeyFromPublicKeyInfo) { // Create an NSS keypair, which will put the keys in the user's NSSDB. ScopedSECKEYPublicKey public_key; ScopedSECKEYPrivateKey private_key; - ASSERT_TRUE(GenerateRSAKeyPairNSS(internal_slot(), 256, + ASSERT_TRUE(GenerateRSAKeyPairNSS(internal_slot(), 512, false /* not permanent */, &public_key, &private_key)); @@ -68,7 +68,7 @@ TEST_F(NSSKeyUtilTest, FailedFindNSSKeyFromPublicKeyInfo) { // Create an NSS keypair, which will put the keys in the user's NSSDB. ScopedSECKEYPublicKey public_key; ScopedSECKEYPrivateKey private_key; - ASSERT_TRUE(GenerateRSAKeyPairNSS(internal_slot(), 256, + ASSERT_TRUE(GenerateRSAKeyPairNSS(internal_slot(), 512, false /* not permanent */, &public_key, &private_key)); diff --git a/crypto/rsa_private_key_unittest.cc b/crypto/rsa_private_key_unittest.cc index b231cac..9e7f6ff 100644 --- a/crypto/rsa_private_key_unittest.cc +++ b/crypto/rsa_private_key_unittest.cc @@ -447,7 +447,8 @@ TEST(RSAPrivateKeyUnitTest, ShortIntegers) { TEST(RSAPrivateKeyUnitTest, CreateFromKeyTest) { scoped_ptr<crypto::RSAPrivateKey> key_pair( - crypto::RSAPrivateKey::Create(256)); + crypto::RSAPrivateKey::Create(512)); + ASSERT_TRUE(key_pair.get()); scoped_ptr<crypto::RSAPrivateKey> key_copy( crypto::RSAPrivateKey::CreateFromKey(key_pair->key())); |