| 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 94405432760428839852dc9eeed8b15926d28b08..5bd40c491fe41bb221b235176ed8bed3d731ce76 100644
|
| --- a/net/tools/cert_verify_tool/verify_using_path_builder.cc
|
| +++ b/net/tools/cert_verify_tool/verify_using_path_builder.cc
|
| @@ -118,7 +118,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";
|
| }
|
| }
|
|
|
| @@ -149,7 +149,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);
|
| }
|
| @@ -164,10 +164,13 @@ bool VerifyUsingPathBuilder(
|
| const std::vector<CertInput>& root_der_certs,
|
| const base::Time at_time,
|
| const base::FilePath& dump_prefix_path) {
|
| - std::cout << "NOTE: CertPathBuilder does not currently use OS trust settings "
|
| - "(--roots must be specified).\n";
|
| - std::cerr << "WARNING: --hostname is not yet verified with CertPathBuilder\n";
|
| -
|
| + if (root_der_certs.empty()) {
|
| + std::cerr << "ERROR: --roots is required for CertPathBuilder to succeed "
|
| + "(as it doesn't use the OS trust store).\n";
|
| + } else {
|
| + std::cout << "NOTE: CertPathBuilder does not currently use OS trust "
|
| + "settings (only --roots will be used)\n";
|
| + }
|
| base::Time::Exploded exploded_time;
|
| at_time.UTCExplode(&exploded_time);
|
| net::der::GeneralizedTime time = ConvertExplodedTime(exploded_time);
|
|
|