OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 NET_QUIC_CRYPTO_PROOF_VERIFIER_H_ | 5 #ifndef NET_QUIC_CRYPTO_PROOF_VERIFIER_H_ |
6 #define NET_QUIC_CRYPTO_PROOF_VERIFIER_H_ | 6 #define NET_QUIC_CRYPTO_PROOF_VERIFIER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 const std::string& server_config, | 79 const std::string& server_config, |
80 QuicVersion quic_version, | 80 QuicVersion quic_version, |
81 base::StringPiece chlo_hash, | 81 base::StringPiece chlo_hash, |
82 const std::vector<std::string>& certs, | 82 const std::vector<std::string>& certs, |
83 const std::string& cert_sct, | 83 const std::string& cert_sct, |
84 const std::string& signature, | 84 const std::string& signature, |
85 const ProofVerifyContext* context, | 85 const ProofVerifyContext* context, |
86 std::string* error_details, | 86 std::string* error_details, |
87 std::unique_ptr<ProofVerifyDetails>* details, | 87 std::unique_ptr<ProofVerifyDetails>* details, |
88 std::unique_ptr<ProofVerifierCallback> callback) = 0; | 88 std::unique_ptr<ProofVerifierCallback> callback) = 0; |
89 | |
90 // VerifyCertChain checks that |certs| is a valid chain for |hostname|. On | |
91 // success, it returns QUIC_SUCCESS. On failure, it returns QUIC_FAILURE and | |
92 // sets |*error_details| to a description of the problem. In either case it | |
93 // may set |*details|, which the caller takes ownership of. | |
94 // | |
95 // |context| specifies an implementation specific struct (which may be nullptr | |
96 // for some implementations) that provides useful information for the | |
97 // verifier, e.g. logging handles. | |
98 // | |
99 // This function may also return QUIC_PENDING, in which case the ProofVerifier | |
100 // will call back, on the original thread, via |callback| when complete. | |
101 // In this case, the ProofVerifier will take ownership of |callback|. | |
102 virtual QuicAsyncStatus VerifyCertChain( | |
103 const std::string& hostname, | |
104 const std::vector<std::string>& certs, | |
105 const ProofVerifyContext* context, | |
106 std::string* error_details, | |
107 std::unique_ptr<ProofVerifyDetails>* details, | |
108 std::unique_ptr<ProofVerifierCallback> callback) = 0; | |
109 }; | 89 }; |
110 | 90 |
111 } // namespace net | 91 } // namespace net |
112 | 92 |
113 #endif // NET_QUIC_CRYPTO_PROOF_VERIFIER_H_ | 93 #endif // NET_QUIC_CRYPTO_PROOF_VERIFIER_H_ |
OLD | NEW |