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

Unified Diff: net/socket/dns_cert_provenance_checker.cc

Issue 8511050: Unify the error checking of crypto::Encryptor and add WARN_UNUSED_RESULT to prevent misuse. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
« crypto/encryptor_openssl.cc ('K') | « crypto/encryptor_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/dns_cert_provenance_checker.cc
diff --git a/net/socket/dns_cert_provenance_checker.cc b/net/socket/dns_cert_provenance_checker.cc
index 04cbce8b5c1057523e77e101453a21e6a535e4e3..f6bdd8262aa5bd1e6142bc2abd90ebc156385141 100644
--- a/net/socket/dns_cert_provenance_checker.cc
+++ b/net/socket/dns_cert_provenance_checker.cc
@@ -312,7 +312,8 @@ std::string DnsCertProvenanceChecker::BuildEncryptedReport(
std::string plaintext(reinterpret_cast<const char*>(p.data()), p.size());
std::string ciphertext;
- encryptor.Encrypt(plaintext, &ciphertext);
+ r = encryptor.Encrypt(plaintext, &ciphertext);
+ CHECK(r);
// We use another Pickle object to serialise the 'outer' wrapping of the
// plaintext.
« crypto/encryptor_openssl.cc ('K') | « crypto/encryptor_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698