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

Unified Diff: net/cert/cert_verify_result.h

Issue 2616343005: Update some documentation for CertVerifyResult::verified_cert (Closed)
Patch Set: use sleevi's text Created 3 years, 11 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/cert/cert_verify_proc.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_verify_result.h
diff --git a/net/cert/cert_verify_result.h b/net/cert/cert_verify_result.h
index 29c0675af3f3141b79d82f9f16170c4b7cbbca40..f8e0ded43f57eaa1ff1e0456b079ba018f2837e9 100644
--- a/net/cert/cert_verify_result.h
+++ b/net/cert/cert_verify_result.h
@@ -26,14 +26,25 @@ class NET_EXPORT CertVerifyResult {
void Reset();
+ // Comparing CertVerifyResult with a nullptr |verified_cert| is invalid.
bool operator==(const CertVerifyResult& other) const;
- // The certificate and chain that was constructed during verification.
- // Note that the though the verified certificate will match the originally
- // supplied certificate, the intermediate certificates stored within may
- // be substantially different. In the event of a verification failure, this
- // will contain the chain as supplied by the server. This may be NULL if
- // running within the sandbox.
+ // The certificate chain that was constructed during verification.
+ //
+ // Note: Although |verified_cert| will match the originally supplied
+ // certificate to be validated, the results of GetIntermediateCertificates()
+ // may be substantially different, both in order and in content, then the
+ // originally supplied intermediates.
+ //
+ // In the event of validation failures, this may contain the originally
+ // supplied certificate chain or a partially constructed path, depending on
+ // the implementation.
+ //
+ // In the event of validation success, the trust anchor will be
+ // |verified_cert->GetIntermediateCertificates().back()| if
+ // there was a certificate chain to the trust anchor, and will
+ // be |verified_cert->os_cert_handle()| if the certificate was
+ // the trust anchor.
scoped_refptr<X509Certificate> verified_cert;
// Bitmask of CERT_STATUS_* from net/cert/cert_status_flags.h. Note that
« no previous file with comments | « net/cert/cert_verify_proc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698