Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: net/quic/crypto/aead_base_decrypter_openssl.cc

Issue 401153002: Switch to BoringSSL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase across DEPS change Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/net_nacl.gyp ('k') | net/quic/crypto/aead_base_encrypter_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/aead_base_decrypter_openssl.cc
diff --git a/net/quic/crypto/aead_base_decrypter_openssl.cc b/net/quic/crypto/aead_base_decrypter_openssl.cc
index 2190bf6966e32c8847a82191865d5a0e00a5dee6..fad0fe1b5204608b02cd8a2a0efc3babd5f2ba8e 100644
--- a/net/quic/crypto/aead_base_decrypter_openssl.cc
+++ b/net/quic/crypto/aead_base_decrypter_openssl.cc
@@ -86,21 +86,18 @@ bool AeadBaseDecrypter::Decrypt(StringPiece nonce,
return false;
}
- ssize_t len = EVP_AEAD_CTX_open(
- ctx_.get(), output, ciphertext.size(),
+ if (!EVP_AEAD_CTX_open(
+ ctx_.get(), output, output_length, 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());
-
- if (len < 0) {
+ associated_data.size())) {
// 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;
}
« no previous file with comments | « net/net_nacl.gyp ('k') | net/quic/crypto/aead_base_encrypter_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698