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

Unified Diff: net/cert/internal/trust_store.cc

Issue 2245643004: Support trust anchor constraints, by specifying them as a certificate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update gypi 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 | « net/cert/internal/trust_store.h ('k') | net/cert/internal/verify_certificate_chain.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/trust_store.cc
diff --git a/net/cert/internal/trust_store.cc b/net/cert/internal/trust_store.cc
index 65cb840b692b608dd02b0d2135a08567b7320b0c..726806b3f6abd9d6683ebf915696ab78c3ae9061 100644
--- a/net/cert/internal/trust_store.cc
+++ b/net/cert/internal/trust_store.cc
@@ -10,7 +10,12 @@ namespace net {
scoped_refptr<TrustAnchor> TrustAnchor::CreateFromCertificateNoConstraints(
scoped_refptr<ParsedCertificate> cert) {
- return scoped_refptr<TrustAnchor>(new TrustAnchor(std::move(cert)));
+ return scoped_refptr<TrustAnchor>(new TrustAnchor(std::move(cert), false));
+}
+
+scoped_refptr<TrustAnchor> TrustAnchor::CreateFromCertificateWithConstraints(
+ scoped_refptr<ParsedCertificate> cert) {
+ return scoped_refptr<TrustAnchor>(new TrustAnchor(std::move(cert), true));
}
der::Input TrustAnchor::spki() const {
@@ -25,8 +30,9 @@ const scoped_refptr<ParsedCertificate>& TrustAnchor::cert() const {
return cert_;
}
-TrustAnchor::TrustAnchor(scoped_refptr<ParsedCertificate> cert)
- : cert_(std::move(cert)) {
+TrustAnchor::TrustAnchor(scoped_refptr<ParsedCertificate> cert,
+ bool enforces_constraints)
+ : cert_(std::move(cert)), enforces_constraints_(enforces_constraints) {
DCHECK(cert_);
}
« no previous file with comments | « net/cert/internal/trust_store.h ('k') | net/cert/internal/verify_certificate_chain.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698