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

Unified Diff: net/cert/x509_certificate_openssl.cc

Issue 584463005: Add debugging information to the SSL blocking page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a few more checks in x509_certificate_ files Created 6 years, 3 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
Index: net/cert/x509_certificate_openssl.cc
diff --git a/net/cert/x509_certificate_openssl.cc b/net/cert/x509_certificate_openssl.cc
index 72d5eee063444215991fae8747d4e584835b61ec..9cb0670d51c1bc56ddf87c82c8c21ea6a744e547 100644
--- a/net/cert/x509_certificate_openssl.cc
+++ b/net/cert/x509_certificate_openssl.cc
@@ -309,7 +309,7 @@ X509_STORE* X509Certificate::cert_store() {
bool X509Certificate::GetDEREncoded(X509Certificate::OSCertHandle cert_handle,
std::string* encoded) {
base::StringPiece der;
- if (!x509_util::GetDER(cert_handle, &der))
+ if (!cert_handle || !x509_util::GetDER(cert_handle, &der))
return false;
encoded->assign(der.data(), der.length());
return true;

Powered by Google App Engine
This is Rietveld 408576698