summaryrefslogtreecommitdiffstats
path: root/net/quic/crypto/aead_base_decrypter_openssl.cc
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-17 20:07:06 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-17 20:07:06 +0000
commit2fcd215fc3158d44935845ee86e98346848cab8b (patch)
treefbf1938a15bc6a027e1912ce9da7d1537f906ef5 /net/quic/crypto/aead_base_decrypter_openssl.cc
parent5657db4b4384ac2cd77c21a68afda29537811f16 (diff)
downloadchromium_src-2fcd215fc3158d44935845ee86e98346848cab8b.zip
chromium_src-2fcd215fc3158d44935845ee86e98346848cab8b.tar.gz
chromium_src-2fcd215fc3158d44935845ee86e98346848cab8b.tar.bz2
Revert 283813 "Switch to BoringSSL."
Failed WebRtcBrowserTest on android_dbg_triggered_tests. > Switch to BoringSSL. > > (This is a reland of r283542 which was reverted in r283591 because it > broke the WebView build. The android_aosp trybots are broken[1] so this > based on hope.) > > This is a much larger change than its diff suggests. If it breaks > something, please revert first and ask questions later. > > [1] http://code.google.com/p/chromium/issues/detail?id=394597 > > BUG=none > > Review URL: https://codereview.chromium.org/399993002 TBR=agl@chromium.org Review URL: https://codereview.chromium.org/405503002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283845 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/crypto/aead_base_decrypter_openssl.cc')
-rw-r--r--net/quic/crypto/aead_base_decrypter_openssl.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/quic/crypto/aead_base_decrypter_openssl.cc b/net/quic/crypto/aead_base_decrypter_openssl.cc
index fad0fe1..2190bf6 100644
--- a/net/quic/crypto/aead_base_decrypter_openssl.cc
+++ b/net/quic/crypto/aead_base_decrypter_openssl.cc
@@ -86,18 +86,21 @@ bool AeadBaseDecrypter::Decrypt(StringPiece nonce,
return false;
}
- if (!EVP_AEAD_CTX_open(
- ctx_.get(), output, output_length, ciphertext.size(),
+ ssize_t len = EVP_AEAD_CTX_open(
+ ctx_.get(), output, ciphertext.size(),
reinterpret_cast<const uint8_t*>(nonce.data()), nonce.size(),
reinterpret_cast<const uint8_t*>(ciphertext.data()), ciphertext.size(),
reinterpret_cast<const uint8_t*>(associated_data.data()),
- associated_data.size())) {
+ associated_data.size());
+
+ if (len < 0) {
// Because QuicFramer does trial decryption, decryption errors are expected
// when encryption level changes. So we don't log decryption errors.
ClearOpenSslErrors();
return false;
}
+ *output_length = len;
return true;
}