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

Unified Diff: components/cast_certificate/cast_crl.cc

Issue 2303673004: Hook up Chrome Cast sender to Cast CRL. (Closed)
Patch Set: VerifyDeviceCertUsingCustomTrustStore and ParseAndVerifyCRLUsingCustomTrustStore 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
Index: components/cast_certificate/cast_crl.cc
diff --git a/components/cast_certificate/cast_crl.cc b/components/cast_certificate/cast_crl.cc
index 79bc2c7fd9ef8c0ac7ded42e6ec72851a1eb679c..ff9e77d96b99376787ffd713b5d9586d12c1fb2a 100644
--- a/components/cast_certificate/cast_crl.cc
+++ b/components/cast_certificate/cast_crl.cc
@@ -316,9 +316,9 @@ bool CastCRLImpl::CheckRevocation(const net::CertPath& trusted_chain,
// Parses and verifies the CRL used to verify the revocation status of
// Cast device certificates.
-std::unique_ptr<CastCRL> ParseAndVerifyCRL(const std::string& crl_proto,
- const base::Time& time,
- net::TrustStore* trust_store) {
+std::unique_ptr<CastCRL> ParseAndVerifyCRLImpl(const std::string& crl_proto,
+ const base::Time& time,
+ net::TrustStore* trust_store) {
CrlBundle crl_bundle;
if (!crl_bundle.ParseFromString(crl_proto)) {
LOG(ERROR) << "CRL - Binary could not be parsed.";
@@ -348,14 +348,16 @@ std::unique_ptr<CastCRL> ParseAndVerifyCRL(const std::string& crl_proto,
std::unique_ptr<CastCRL> ParseAndVerifyCRL(const std::string& crl_proto,
const base::Time& time) {
- return ParseAndVerifyCRL(crl_proto, time, &CastCRLTrustStore::Get());
+ return ParseAndVerifyCRLImpl(crl_proto, time, &CastCRLTrustStore::Get());
}
-std::unique_ptr<CastCRL> ParseAndVerifyCRLForTest(
+std::unique_ptr<CastCRL> ParseAndVerifyCRLUsingCustomTrustStore(
sheretov 2016/09/10 00:26:57 Can we eliminate ParseAndVerifyCRLImpl, move all t
ryanchung 2016/09/10 00:50:09 Done.
const std::string& crl_proto,
const base::Time& time,
net::TrustStore* trust_store) {
- return ParseAndVerifyCRL(crl_proto, time, trust_store);
+ if (!trust_store)
+ return nullptr;
+ return ParseAndVerifyCRLImpl(crl_proto, time, trust_store);
}
} // namespace cast_certificate

Powered by Google App Engine
This is Rietveld 408576698