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_SOURCE_H_ | 5 #ifndef NET_QUIC_CRYPTO_PROOF_SOURCE_H_ |
6 #define NET_QUIC_CRYPTO_PROOF_SOURCE_H_ | 6 #define NET_QUIC_CRYPTO_PROOF_SOURCE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "net/base/ip_endpoint.h" |
11 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
12 | 13 |
13 namespace net { | 14 namespace net { |
14 | 15 |
15 // ProofSource is an interface by which a QUIC server can obtain certificate | 16 // ProofSource is an interface by which a QUIC server can obtain certificate |
16 // chains and signatures that prove its identity. | 17 // chains and signatures that prove its identity. |
17 class NET_EXPORT_PRIVATE ProofSource { | 18 class NET_EXPORT_PRIVATE ProofSource { |
18 public: | 19 public: |
19 virtual ~ProofSource() {} | 20 virtual ~ProofSource() {} |
20 | 21 |
(...skipping 17 matching lines...) Expand all Loading... |
38 // | 39 // |
39 // The signature values should be cached because |server_config| will be | 40 // The signature values should be cached because |server_config| will be |
40 // somewhat static. However, since they aren't bounded, the ProofSource may | 41 // somewhat static. However, since they aren't bounded, the ProofSource may |
41 // wish to evicit entries from that cache, thus the caller takes ownership of | 42 // wish to evicit entries from that cache, thus the caller takes ownership of |
42 // |*out_signature|. | 43 // |*out_signature|. |
43 // | 44 // |
44 // |hostname| may be empty to signify that a default certificate should be | 45 // |hostname| may be empty to signify that a default certificate should be |
45 // used. | 46 // used. |
46 // | 47 // |
47 // This function may be called concurrently. | 48 // This function may be called concurrently. |
48 virtual bool GetProof(const std::string& hostname, | 49 virtual bool GetProof(const IPEndPoint& server_ip, |
| 50 const std::string& hostname, |
49 const std::string& server_config, | 51 const std::string& server_config, |
50 bool ecdsa_ok, | 52 bool ecdsa_ok, |
51 const std::vector<std::string>** out_certs, | 53 const std::vector<std::string>** out_certs, |
52 std::string* out_signature) = 0; | 54 std::string* out_signature) = 0; |
53 }; | 55 }; |
54 | 56 |
55 } // namespace net | 57 } // namespace net |
56 | 58 |
57 #endif // NET_QUIC_CRYPTO_PROOF_SOURCE_H_ | 59 #endif // NET_QUIC_CRYPTO_PROOF_SOURCE_H_ |
OLD | NEW |