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

Unified Diff: components/cast_certificate/cast_crl_unittest.cc

Issue 2327973002: Add CertErrors* parameter to the main Certificate parsing functions. (Closed)
Patch Set: StringPiece is kind of dangerous... 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 | « components/cast_certificate/cast_crl.cc ('k') | net/cert/internal/cert_issuer_source_aia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cast_certificate/cast_crl_unittest.cc
diff --git a/components/cast_certificate/cast_crl_unittest.cc b/components/cast_certificate/cast_crl_unittest.cc
index 1062e8756e7e303753a4525d644c758a9dcb19b8..b108b5fc1d7e21bf1db0e346d05c3aef896d29e1 100644
--- a/components/cast_certificate/cast_crl_unittest.cc
+++ b/components/cast_certificate/cast_crl_unittest.cc
@@ -7,6 +7,7 @@
#include "components/cast_certificate/cast_cert_validator_test_helpers.h"
#include "components/cast_certificate/cast_crl.h"
#include "components/cast_certificate/proto/test_suite.pb.h"
+#include "net/cert/internal/cert_errors.h"
#include "net/cert/internal/trust_store_in_memory.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -21,9 +22,10 @@ std::unique_ptr<net::TrustStoreInMemory> CreateTrustStoreFromFile(
const auto trusted_test_roots =
cast_certificate::testing::ReadCertificateChainFromFile(path);
for (const auto& trusted_root : trusted_test_roots) {
+ net::CertErrors errors;
scoped_refptr<net::ParsedCertificate> cert(
- net::ParsedCertificate::CreateFromCertificateCopy(trusted_root, {}));
- EXPECT_TRUE(cert);
+ net::ParsedCertificate::Create(trusted_root, {}, &errors));
+ EXPECT_TRUE(cert) << errors.ToDebugString();
scoped_refptr<net::TrustAnchor> anchor =
net::TrustAnchor::CreateFromCertificateWithConstraints(std::move(cert));
trust_store->AddTrustAnchor(std::move(anchor));
« no previous file with comments | « components/cast_certificate/cast_crl.cc ('k') | net/cert/internal/cert_issuer_source_aia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698