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

Unified Diff: components/cast_certificate/cast_cert_validator.cc

Issue 2126803004: WIP: NSS trust store integration for path builder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert-command-line-path-builder-add_certpathbuilder
Patch Set: . 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 | net/BUILD.gn » ('j') | no next file with comments »
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 f7c62dd7aff5bc32904119251bc05f78a79ff329..887427496b874f156555ccca2185a3fd5b26c8ac 100644
--- a/components/cast_certificate/cast_cert_validator.cc
+++ b/components/cast_certificate/cast_cert_validator.cc
@@ -23,7 +23,7 @@
#include "net/cert/internal/path_builder.h"
#include "net/cert/internal/signature_algorithm.h"
#include "net/cert/internal/signature_policy.h"
-#include "net/cert/internal/trust_store.h"
+#include "net/cert/internal/trust_store_static.h"
#include "net/cert/internal/verify_signed_data.h"
#include "net/der/encode_values.h"
#include "net/der/input.h"
@@ -53,7 +53,7 @@ class CastTrustStore {
base::LeakySingletonTraits<CastTrustStore>>::get();
}
- static net::TrustStore& Get() { return GetInstance()->store_; }
+ static net::TrustStoreStatic& Get() { return GetInstance()->trust_store_; }
private:
friend struct base::DefaultSingletonTraits<CastTrustStore>;
@@ -72,10 +72,10 @@ class CastTrustStore {
data, N, net::ParsedCertificate::DataSource::EXTERNAL_REFERENCE,
{});
CHECK(root);
- store_.AddTrustedCertificate(std::move(root));
+ trust_store_.AddTrustedCertificate(std::move(root));
}
- net::TrustStore store_;
+ net::TrustStoreStatic trust_store_;
DISALLOW_COPY_AND_ASSIGN(CastTrustStore);
};
@@ -290,9 +290,9 @@ bool VerifyDeviceCert(const std::vector<std::string>& certs,
if (!net::der::EncodeTimeAsGeneralizedTime(time, &verification_time))
return false;
net::CertPathBuilder::Result result;
- net::CertPathBuilder path_builder(target_cert.get(), &CastTrustStore::Get(),
- signature_policy.get(), verification_time,
- &result);
+ net::CertPathBuilder path_builder(target_cert.get(), signature_policy.get(),
+ verification_time, &result);
+ path_builder.AddTrustStore(&CastTrustStore::Get());
path_builder.AddCertIssuerSource(&intermediate_cert_issuer_source);
net::CompletionStatus rv = path_builder.Run(base::Closure());
DCHECK_EQ(rv, net::CompletionStatus::SYNC);
« no previous file with comments | « no previous file | net/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698