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

Unified Diff: components/cast_certificate/cast_crl.cc

Issue 2303673004: Hook up Chrome Cast sender to Cast CRL. (Closed)
Patch Set: Fixed nit Created 4 years, 2 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.h ('k') | components/cast_certificate/cast_crl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cast_certificate/cast_crl.cc
diff --git a/components/cast_certificate/cast_crl.cc b/components/cast_certificate/cast_crl.cc
index 9defacf370d3885488b33a1b23428d36bcb757ae..eb0b8d1d49dd27c5467c4e7dad3af178d78901e4 100644
--- a/components/cast_certificate/cast_crl.cc
+++ b/components/cast_certificate/cast_crl.cc
@@ -316,11 +316,21 @@ bool CastCRLImpl::CheckRevocation(const net::CertPath& trusted_chain,
return true;
}
-// Parses and verifies the CRL used to verify the revocation status of
-// Cast device certificates.
+} // namespace
+
std::unique_ptr<CastCRL> ParseAndVerifyCRL(const std::string& crl_proto,
- const base::Time& time,
- net::TrustStore* trust_store) {
+ const base::Time& time) {
+ return ParseAndVerifyCRLUsingCustomTrustStore(crl_proto, time,
+ &CastCRLTrustStore::Get());
+}
+
+std::unique_ptr<CastCRL> ParseAndVerifyCRLUsingCustomTrustStore(
+ const std::string& crl_proto,
+ const base::Time& time,
+ net::TrustStore* trust_store) {
+ if (!trust_store)
+ return ParseAndVerifyCRL(crl_proto, time);
+
CrlBundle crl_bundle;
if (!crl_bundle.ParseFromString(crl_proto)) {
LOG(ERROR) << "CRL - Binary could not be parsed.";
@@ -346,18 +356,4 @@ std::unique_ptr<CastCRL> ParseAndVerifyCRL(const std::string& crl_proto,
return nullptr;
}
-} // namespace
-
-std::unique_ptr<CastCRL> ParseAndVerifyCRL(const std::string& crl_proto,
- const base::Time& time) {
- return ParseAndVerifyCRL(crl_proto, time, &CastCRLTrustStore::Get());
-}
-
-std::unique_ptr<CastCRL> ParseAndVerifyCRLForTest(
- const std::string& crl_proto,
- const base::Time& time,
- net::TrustStore* trust_store) {
- return ParseAndVerifyCRL(crl_proto, time, trust_store);
-}
-
} // namespace cast_certificate
« no previous file with comments | « components/cast_certificate/cast_crl.h ('k') | components/cast_certificate/cast_crl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698