Index: trunk/src/net/quic/crypto/aead_base_encrypter_openssl.cc |
=================================================================== |
--- trunk/src/net/quic/crypto/aead_base_encrypter_openssl.cc (revision 283844) |
+++ trunk/src/net/quic/crypto/aead_base_encrypter_openssl.cc (working copy) |
@@ -81,18 +81,14 @@ |
return false; |
} |
- size_t len; |
- if (!EVP_AEAD_CTX_seal( |
- ctx_.get(), |
- output, |
- &len, |
- plaintext.size() + auth_tag_size_, |
- reinterpret_cast<const uint8_t*>(nonce.data()), |
- nonce.size(), |
- reinterpret_cast<const uint8_t*>(plaintext.data()), |
- plaintext.size(), |
- reinterpret_cast<const uint8_t*>(associated_data.data()), |
- associated_data.size())) { |
+ ssize_t len = EVP_AEAD_CTX_seal( |
+ ctx_.get(), output, plaintext.size() + auth_tag_size_, |
+ reinterpret_cast<const uint8_t*>(nonce.data()), nonce.size(), |
+ reinterpret_cast<const uint8_t*>(plaintext.data()), plaintext.size(), |
+ reinterpret_cast<const uint8_t*>(associated_data.data()), |
+ associated_data.size()); |
+ |
+ if (len < 0) { |
DLogOpenSslErrors(); |
return false; |
} |