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

Unified Diff: net/cert/x509_certificate.h

Issue 2760723002: Check X509Certificate::CreateFromHandle result. (Closed)
Patch Set: 2nd round of updates Created 3 years, 9 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.h
diff --git a/net/cert/x509_certificate.h b/net/cert/x509_certificate.h
index 59f1b772fe7b7340c511c08a15ebaaf66cbad13f..7840292a9ecd158234a842b861649349ae0d569e 100644
--- a/net/cert/x509_certificate.h
+++ b/net/cert/x509_certificate.h
@@ -127,7 +127,11 @@ class NET_EXPORT X509Certificate
};
// Create an X509Certificate from a handle to the certificate object in the
- // underlying crypto library.
+ // underlying crypto library. Returns NULL on failure to parse or extract
+ // data from the the certificate. Note that this does not guarantee the
+ // certificate is fully parsed and validated, only that the members of this
+ // class, such as subject, issuer, expiry times, and serial number, could be
+ // successfully initialized from the certificate.
static scoped_refptr<X509Certificate> CreateFromHandle(
OSCertHandle cert_handle,
const OSCertHandles& intermediates);

Powered by Google App Engine
This is Rietveld 408576698