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

Unified Diff: components/cast_certificate/cast_cert_validator_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_cert_validator.cc ('k') | components/cast_certificate/cast_crl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cast_certificate/cast_cert_validator_unittest.cc
diff --git a/components/cast_certificate/cast_cert_validator_unittest.cc b/components/cast_certificate/cast_cert_validator_unittest.cc
index d3de949d5719d441176028538a436d1afa7b2777..a12f6da571d1e7b5814ba8afe3d8b2390630b2bd 100644
--- a/components/cast_certificate/cast_cert_validator_unittest.cc
+++ b/components/cast_certificate/cast_cert_validator_unittest.cc
@@ -5,6 +5,7 @@
#include "components/cast_certificate/cast_cert_validator.h"
#include "components/cast_certificate/cast_cert_validator_test_helpers.h"
+#include "net/cert/internal/cert_errors.h"
#include "net/cert/internal/parsed_certificate.h"
#include "net/cert/internal/trust_store_in_memory.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -79,9 +80,10 @@ void RunTest(TestResult expected_result,
ASSERT_FALSE(certs.empty());
// Parse the root certificate of the chain.
+ net::CertErrors errors;
scoped_refptr<net::ParsedCertificate> root =
- net::ParsedCertificate::CreateFromCertificateCopy(certs.back(), {});
- ASSERT_TRUE(root);
+ net::ParsedCertificate::Create(certs.back(), {}, &errors);
+ ASSERT_TRUE(root) << errors.ToDebugString();
// Remove it from the chain.
certs.pop_back();
« no previous file with comments | « components/cast_certificate/cast_cert_validator.cc ('k') | components/cast_certificate/cast_crl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698