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

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

Issue 2305083002: Misc changes to cert_verify_tool for errors (Closed)
Patch Set: correct comment Created 4 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
« no previous file with comments | « net/tools/cert_verify_tool/cert_verify_tool_util.cc ('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 aba27b158c1611f65ae3fa05cc50df9934629cf7..4c66a0e8e5338a70ba19fa63d22e7c7e6bc858a1 100644
--- a/net/tools/cert_verify_tool/verify_using_path_builder.cc
+++ b/net/tools/cert_verify_tool/verify_using_path_builder.cc
@@ -124,7 +124,7 @@ void PrintCertErrors(const net::CertErrors& errors) {
// should likely be extracted to a common location and used by unit-tests and
// other debugging needs.
for (const auto& error : errors.errors()) {
- std::cout << " " << error.type;
+ std::cout << " " << error.type << "\n";
}
}
@@ -155,7 +155,7 @@ void PrintResultPath(const net::CertPathBuilder::ResultPath* result_path,
}
// Print the errors.
- if (result_path->errors.errors().empty()) {
+ if (!result_path->errors.errors().empty()) {
std::cout << "Errors:\n";
PrintCertErrors(result_path->errors);
}
@@ -170,8 +170,6 @@ bool VerifyUsingPathBuilder(
const std::vector<CertInput>& root_der_certs,
const base::Time at_time,
const base::FilePath& dump_prefix_path) {
- std::cerr << "WARNING: --hostname is not yet verified with CertPathBuilder\n";
-
base::Time::Exploded exploded_time;
at_time.UTCExplode(&exploded_time);
net::der::GeneralizedTime time = ConvertExplodedTime(exploded_time);
@@ -197,8 +195,10 @@ bool VerifyUsingPathBuilder(
base::ThreadTaskRunnerHandle::Get());
trust_store.SetPrimaryTrustStore(&trust_store_nss);
#else
- std::cout << "NOTE: CertPathBuilder does not currently use OS trust settings "
- "(--roots must be specified).\n";
+ if (root_der_certs.empty()) {
+ std::cerr << "NOTE: CertPathBuilder does not currently use OS trust "
+ "settings (--roots must be specified).\n";
+ }
#endif
net::CertIssuerSourceStatic intermediate_cert_issuer_source;
« no previous file with comments | « net/tools/cert_verify_tool/cert_verify_tool_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698