| 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..a967c455d37f9517ab864c0fbe16bcea3535246e 100644
|
| --- a/components/cast_certificate/cast_crl.cc
|
| +++ b/components/cast_certificate/cast_crl.cc
|
| @@ -314,11 +314,17 @@ bool CastCRLImpl::CheckRevocation(const net::CertPath& trusted_chain,
|
| return true;
|
| }
|
|
|
| +} // namespace
|
| +
|
| // 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> ParseAndVerifyCRLUsingCustomTrustStore(
|
| + const std::string& crl_proto,
|
| + const base::Time& time,
|
| + net::TrustStore* trust_store) {
|
| + if (!trust_store)
|
| + return nullptr;
|
| +
|
| CrlBundle crl_bundle;
|
| if (!crl_bundle.ParseFromString(crl_proto)) {
|
| LOG(ERROR) << "CRL - Binary could not be parsed.";
|
| @@ -344,18 +350,10 @@ 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);
|
| + return ParseAndVerifyCRLUsingCustomTrustStore(crl_proto, time,
|
| + &CastCRLTrustStore::Get());
|
| }
|
|
|
| } // namespace cast_certificate
|
|
|