diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-30 20:23:34 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-30 20:23:34 +0000 |
commit | 999071ac8fb1f244aa4f4d1b1db7350f0e86b1f3 (patch) | |
tree | 8653a50c6db1c4bc274bc93d341dafb63dedd665 /net | |
parent | 1aa88b5a4d91c9015ede1f21d96928fe1e280454 (diff) | |
download | chromium_src-999071ac8fb1f244aa4f4d1b1db7350f0e86b1f3.zip chromium_src-999071ac8fb1f244aa4f4d1b1db7350f0e86b1f3.tar.gz chromium_src-999071ac8fb1f244aa4f4d1b1db7350f0e86b1f3.tar.bz2 |
PK11_DecryptWithSymKey and PK11_EncryptWithSymKey have been
renamed PK11_Decrypt and PK11_Encrypt.
Update NSS to r191424 to pick up the function renaming. The
underlying CL is https://codereview.chromium.org/13327005/
R=rsleevi@chromium.org,rtenneti@chromium.org
BUG=none
TEST=net_unittests
Review URL: https://chromiumcodereview.appspot.com/13340002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191554 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/quic/crypto/aes_128_gcm_decrypter_nss.cc | 19 | ||||
-rw-r--r-- | net/quic/crypto/aes_128_gcm_encrypter_nss.cc | 18 |
2 files changed, 16 insertions, 21 deletions
diff --git a/net/quic/crypto/aes_128_gcm_decrypter_nss.cc b/net/quic/crypto/aes_128_gcm_decrypter_nss.cc index f8f156d..1d5c485 100644 --- a/net/quic/crypto/aes_128_gcm_decrypter_nss.cc +++ b/net/quic/crypto/aes_128_gcm_decrypter_nss.cc @@ -25,8 +25,8 @@ const size_t kAuthTagSize = 16; bool Aes128GcmDecrypter::IsSupported() { #if defined(USE_NSS) // We're using system NSS libraries. Regrettably NSS 3.14.x has a bug in the - // AES GCM code (NSS bug 853285) and is missing the PK11_DecryptWithSymKey - // function (NSS bug 854063). Both problems should be fixed in NSS 3.15. + // AES GCM code (NSS bug 853285) and is missing the PK11_Decrypt function + // (NSS bug 854063). Both problems should be fixed in NSS 3.15. return false; #else // We're using our own copy of NSS. @@ -123,15 +123,12 @@ QuicData* Aes128GcmDecrypter::DecryptWithNonce(StringPiece nonce, unsigned int output_len; // If an incorrect authentication tag causes a decryption failure, the NSS // error is SEC_ERROR_BAD_DATA (-8190). - if (PK11_DecryptWithSymKey(aes_key.get(), CKM_AES_GCM, ¶m, - reinterpret_cast<unsigned char*>( - plaintext.get()), - &output_len, plaintext_capacity, - reinterpret_cast<const unsigned char*>( - ciphertext.data()), - ciphertext.size()) != SECSuccess) { - DLOG(INFO) << "PK11_DecryptWithSymKey failed: NSS error " - << PORT_GetError(); + if (PK11_Decrypt(aes_key.get(), CKM_AES_GCM, ¶m, + reinterpret_cast<unsigned char*>(plaintext.get()), + &output_len, plaintext_capacity, + reinterpret_cast<const unsigned char*>(ciphertext.data()), + ciphertext.size()) != SECSuccess) { + DLOG(INFO) << "PK11_Decrypt failed: NSS error " << PORT_GetError(); return NULL; } diff --git a/net/quic/crypto/aes_128_gcm_encrypter_nss.cc b/net/quic/crypto/aes_128_gcm_encrypter_nss.cc index 05be7c2..57d364c 100644 --- a/net/quic/crypto/aes_128_gcm_encrypter_nss.cc +++ b/net/quic/crypto/aes_128_gcm_encrypter_nss.cc @@ -26,8 +26,8 @@ const size_t kAuthTagSize = 16; bool Aes128GcmEncrypter::IsSupported() { #if defined(USE_NSS) // We're using system NSS libraries. Regrettably NSS 3.14.x has a bug in the - // AES GCM code (NSS bug 853285) and is missing the PK11_EncryptWithSymKey - // function (NSS bug 854063). Both problems should be fixed in NSS 3.15. + // AES GCM code (NSS bug 853285) and is missing the PK11_Encrypt function + // (NSS bug 854063). Both problems should be fixed in NSS 3.15. return false; #else // We're using our own copy of NSS. @@ -133,14 +133,12 @@ QuicData* Aes128GcmEncrypter::EncryptWithNonce(StringPiece nonce, param.len = sizeof(gcm_params); unsigned int output_len; - if (PK11_EncryptWithSymKey(aes_key.get(), CKM_AES_GCM, ¶m, - reinterpret_cast<unsigned char*>( - ciphertext.get()), - &output_len, ciphertext_size, - reinterpret_cast<const unsigned char*>( - plaintext.data()), - plaintext.size()) != SECSuccess) { - DLOG(INFO) << "PK11_EncryptWithSymKey failed"; + if (PK11_Encrypt(aes_key.get(), CKM_AES_GCM, ¶m, + reinterpret_cast<unsigned char*>(ciphertext.get()), + &output_len, ciphertext_size, + reinterpret_cast<const unsigned char*>(plaintext.data()), + plaintext.size()) != SECSuccess) { + DLOG(INFO) << "PK11_Encrypt failed"; return NULL; } |