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

Unified Diff: components/cast_certificate/cast_cert_validator.cc

Issue 2225493003: Don't treat trust anchors as certificates during path building. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix components_unittests compile (hopefully) Created 4 years, 4 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 | « no previous file | components/cast_certificate/cast_crl.h » ('j') | net/cert/internal/path_builder.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cast_certificate/cast_cert_validator.cc
diff --git a/components/cast_certificate/cast_cert_validator.cc b/components/cast_certificate/cast_cert_validator.cc
index 9dcff2fe63f99412671f756366a8591e34027614..f022fc6001548904669f9280574fec4ee998e7f6 100644
--- a/components/cast_certificate/cast_cert_validator.cc
+++ b/components/cast_certificate/cast_cert_validator.cc
@@ -67,12 +67,15 @@ class CastTrustStore {
// storage.
template <size_t N>
void AddAnchor(const uint8_t (&data)[N]) {
- scoped_refptr<net::ParsedCertificate> root =
+ scoped_refptr<net::ParsedCertificate> cert =
net::ParsedCertificate::CreateFromCertificateData(
data, N, net::ParsedCertificate::DataSource::EXTERNAL_REFERENCE,
{});
- CHECK(root);
- store_.AddTrustedCertificate(std::move(root));
+ CHECK(cert);
+ // TODO(crbug.com/635200): Support anchor constraints.
+ auto anchor =
mattm 2016/08/09 00:59:21 I think using auto for these Foo::Create calls don
eroman 2016/08/09 01:37:20 Done.
mattm 2016/08/09 19:51:04 There are a few in other files too (cast_crl.cc, c
eroman 2016/08/09 23:42:07 Done.
+ net::TrustAnchor::CreateFromCertificateNoConstraints(std::move(cert));
+ store_.AddTrustAnchor(std::move(anchor));
}
net::TrustStore store_;
« no previous file with comments | « no previous file | components/cast_certificate/cast_crl.h » ('j') | net/cert/internal/path_builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698