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

Unified Diff: net/tools/cert_verify_tool/verify_using_path_builder.cc

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/data/verify_certificate_chain_unittest/violates-pathlen-1-constrained-root.pem ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/cert_verify_tool/verify_using_path_builder.cc
diff --git a/net/tools/cert_verify_tool/verify_using_path_builder.cc b/net/tools/cert_verify_tool/verify_using_path_builder.cc
index 96795310fab1042c02af595ac70c0d87f30e2124..271730646c68695fed64213aa90579ad0ac55fc7 100644
--- a/net/tools/cert_verify_tool/verify_using_path_builder.cc
+++ b/net/tools/cert_verify_tool/verify_using_path_builder.cc
@@ -134,7 +134,7 @@ void PrintResultPath(const net::CertPathBuilder::ResultPath* result_path,
size_t index,
bool is_best) {
std::cout << "path " << index << " "
- << (result_path->valid ? "valid" : "invalid")
+ << (result_path->IsValid() ? "valid" : "invalid")
<< (is_best ? " (best)" : "") << "\n";
// Print the certificate chain.
@@ -155,10 +155,12 @@ void PrintResultPath(const net::CertPathBuilder::ResultPath* result_path,
<< SubjectFromTrustAnchor(trust_anchor.get()) << "\n";
}
- // Print the errors.
- if (!result_path->errors.empty()) {
+ // Print the errors/warnings if there were any.
+ std::string errors_str =
+ result_path->errors.ToDebugString(result_path->path.certs);
+ if (!errors_str.empty()) {
std::cout << "Errors:\n";
- std::cout << result_path->errors.ToDebugString() << "\n";
+ std::cout << errors_str << "\n";
}
}
« no previous file with comments | « net/data/verify_certificate_chain_unittest/violates-pathlen-1-constrained-root.pem ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698