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

Unified Diff: net/cert/internal/verify_certificate_chain.h

Issue 2759023002: Improvements to the net/cert/internal error handling. (Closed)
Patch Set: fix comment 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
« no previous file with comments | « net/cert/internal/path_builder_unittest.cc ('k') | net/cert/internal/verify_certificate_chain.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/verify_certificate_chain.h
diff --git a/net/cert/internal/verify_certificate_chain.h b/net/cert/internal/verify_certificate_chain.h
index 00d6680eb78cc854867a5c8385a761de5fc92393..5ebecb5e0ad57f6d46e6e3e0637bb25df4a46406 100644
--- a/net/cert/internal/verify_certificate_chain.h
+++ b/net/cert/internal/verify_certificate_chain.h
@@ -61,18 +61,18 @@ class TrustAnchor;
// ---------
//
// Returns true if the target certificate can be verified.
+// TODO(eroman): This return value is redundant with the |errors| parameter.
//
// errors:
// Must be non-null. The set of errors/warnings encountered while
-// validating the path are appended to this structure. There is no
-// guarantee that on success |errors| is empty, or conversely that
-// on failure |errors| is non-empty. Consumers must only use the
-// boolean return value to determine success/failure.
+// validating the path are appended to this structure. If verification
+// failed, then there is guaranteed to be at least 1 error written to
+// |errors|.
NET_EXPORT bool VerifyCertificateChain(const ParsedCertificateList& certs,
const TrustAnchor* trust_anchor,
const SignaturePolicy* signature_policy,
const der::GeneralizedTime& time,
- CertErrors* errors) WARN_UNUSED_RESULT;
+ CertPathErrors* errors);
// TODO(crbug.com/634443): Move exported errors to a central location?
extern CertErrorId kValidityFailedNotAfter;
« no previous file with comments | « net/cert/internal/path_builder_unittest.cc ('k') | net/cert/internal/verify_certificate_chain.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698