OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_CAST_CERTIFICATE_CAST_CRL_H_ | 5 #ifndef COMPONENTS_CAST_CERTIFICATE_CAST_CRL_H_ |
6 #define COMPONENTS_CAST_CERTIFICATE_CAST_CRL_H_ | 6 #define COMPONENTS_CAST_CERTIFICATE_CAST_CRL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 // | 46 // |
47 // Inputs: | 47 // Inputs: |
48 // * |crl_proto| is a serialized cast_certificate.CrlBundle proto. | 48 // * |crl_proto| is a serialized cast_certificate.CrlBundle proto. |
49 // * |time| is the unix timestamp to use for determining if the CRL is valid. | 49 // * |time| is the unix timestamp to use for determining if the CRL is valid. |
50 // | 50 // |
51 // Output: | 51 // Output: |
52 // Returns the CRL object if success, nullptr otherwise. | 52 // Returns the CRL object if success, nullptr otherwise. |
53 std::unique_ptr<CastCRL> ParseAndVerifyCRL(const std::string& crl_proto, | 53 std::unique_ptr<CastCRL> ParseAndVerifyCRL(const std::string& crl_proto, |
54 const base::Time& time); | 54 const base::Time& time); |
55 | 55 |
56 // Exposed only for testing, not for use in production code. | 56 // This is an overloaded version of ParseAndVerifyCRL that allows |
57 // the input of a custom TrustStore. |trust_store| must not be nullptr. | |
57 // | 58 // |
58 // This is an overloaded version of ParseAndVerifyCRL that allows | 59 // For production use pass |trust_store| as nullptr to use the production trust |
eroman
2016/09/17 00:44:41
This doesn't agree with comment above.
ryanchung
2016/09/22 21:38:51
Done. Allowing nullptr to be passed.
| |
59 // the input of a custom TrustStore. | 60 // store. |
60 std::unique_ptr<CastCRL> ParseAndVerifyCRLForTest(const std::string& crl_proto, | 61 std::unique_ptr<CastCRL> ParseAndVerifyCRLUsingCustomTrustStore( |
61 const base::Time& time, | 62 const std::string& crl_proto, |
62 net::TrustStore* trust_store); | 63 const base::Time& time, |
64 net::TrustStore* trust_store); | |
63 | 65 |
64 } // namespace cast_certificate | 66 } // namespace cast_certificate |
65 | 67 |
66 #endif // COMPONENTS_CAST_CERTIFICATE_CAST_CRL_H_ | 68 #endif // COMPONENTS_CAST_CERTIFICATE_CAST_CRL_H_ |
OLD | NEW |