Chromium Code Reviews| 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..561e35c3e0eb8d7fc6307dde5b738d6ed3ed0635 100644 |
| --- a/components/cast_certificate/cast_crl.cc |
| +++ b/components/cast_certificate/cast_crl.cc |
| @@ -321,6 +321,9 @@ bool CastCRLImpl::CheckRevocation(const net::CertPath& trusted_chain, |
| std::unique_ptr<CastCRL> ParseAndVerifyCRL(const std::string& crl_proto, |
|
eroman
2016/09/22 22:02:51
Same thing here -- how about just moving this into
ryanchung
2016/09/22 22:43:35
Done.
|
| 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."; |
| @@ -353,10 +356,12 @@ std::unique_ptr<CastCRL> ParseAndVerifyCRL(const std::string& crl_proto, |
| return ParseAndVerifyCRL(crl_proto, time, &CastCRLTrustStore::Get()); |
| } |
| -std::unique_ptr<CastCRL> ParseAndVerifyCRLForTest( |
| +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); |
| return ParseAndVerifyCRL(crl_proto, time, trust_store); |
| } |