Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1629)

Side by Side Diff: net/quic/core/crypto/proof_source.h

Issue 2516033003: Landing Recent QUIC changes until Mon Nov 14 04:43:50 2016 +0000 (Closed)
Patch Set: Remove unused UpdatePacketGapSentHistogram() function. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "net/base/net_export.h" 13 #include "net/base/net_export.h"
14 #include "net/quic/core/crypto/quic_crypto_proof.h"
14 #include "net/quic/core/quic_protocol.h" 15 #include "net/quic/core/quic_protocol.h"
15 16
16 namespace net { 17 namespace net {
17 18
18 class IPAddress; 19 class IPAddress;
19 20
20 // ProofSource is an interface by which a QUIC server can obtain certificate 21 // ProofSource is an interface by which a QUIC server can obtain certificate
21 // chains and signatures that prove its identity. 22 // chains and signatures that prove its identity.
22 class NET_EXPORT_PRIVATE ProofSource { 23 class NET_EXPORT_PRIVATE ProofSource {
23 public: 24 public:
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // 60 //
60 // |signature| contains the signature of the server config. 61 // |signature| contains the signature of the server config.
61 // 62 //
62 // |leaf_cert_sct| holds the signed timestamp (RFC6962) of the leaf cert. 63 // |leaf_cert_sct| holds the signed timestamp (RFC6962) of the leaf cert.
63 // 64 //
64 // |details| holds a pointer to an object representing the statistics, if 65 // |details| holds a pointer to an object representing the statistics, if
65 // any, gathered during the operation of GetProof. If no stats are 66 // any, gathered during the operation of GetProof. If no stats are
66 // available, this will be nullptr. 67 // available, this will be nullptr.
67 virtual void Run(bool ok, 68 virtual void Run(bool ok,
68 const scoped_refptr<Chain>& chain, 69 const scoped_refptr<Chain>& chain,
69 const std::string& signature, 70 const QuicCryptoProof& proof,
70 const std::string& leaf_cert_sct,
71 std::unique_ptr<Details> details) = 0; 71 std::unique_ptr<Details> details) = 0;
72 72
73 private: 73 private:
74 Callback(const Callback&) = delete; 74 Callback(const Callback&) = delete;
75 Callback& operator=(const Callback&) = delete; 75 Callback& operator=(const Callback&) = delete;
76 }; 76 };
77 77
78 virtual ~ProofSource() {} 78 virtual ~ProofSource() {}
79 79
80 // GetProof finds a certificate chain for |hostname|, sets |out_chain| to 80 // GetProof finds a certificate chain for |hostname|, sets |out_chain| to
(...skipping 23 matching lines...) Expand all
104 // cert. 104 // cert.
105 // 105 //
106 // This function may be called concurrently. 106 // This function may be called concurrently.
107 virtual bool GetProof(const IPAddress& server_ip, 107 virtual bool GetProof(const IPAddress& server_ip,
108 const std::string& hostname, 108 const std::string& hostname,
109 const std::string& server_config, 109 const std::string& server_config,
110 QuicVersion quic_version, 110 QuicVersion quic_version,
111 base::StringPiece chlo_hash, 111 base::StringPiece chlo_hash,
112 const QuicTagVector& connection_options, 112 const QuicTagVector& connection_options,
113 scoped_refptr<Chain>* out_chain, 113 scoped_refptr<Chain>* out_chain,
114 std::string* out_signature, 114 QuicCryptoProof* out_proof) = 0;
115 std::string* out_leaf_cert_sct) = 0;
116 115
117 // Async version of GetProof with identical semantics, except that the results 116 // Async version of GetProof with identical semantics, except that the results
118 // are delivered to |callback|. Callers should expect that |callback| might 117 // are delivered to |callback|. Callers should expect that |callback| might
119 // be invoked synchronously. The ProofSource takes ownership of |callback| in 118 // be invoked synchronously. The ProofSource takes ownership of |callback| in
120 // any case. 119 // any case.
121 virtual void GetProof(const IPAddress& server_ip, 120 virtual void GetProof(const IPAddress& server_ip,
122 const std::string& hostname, 121 const std::string& hostname,
123 const std::string& server_config, 122 const std::string& server_config,
124 QuicVersion quic_version, 123 QuicVersion quic_version,
125 base::StringPiece chlo_hash, 124 base::StringPiece chlo_hash,
126 const QuicTagVector& connection_options, 125 const QuicTagVector& connection_options,
127 std::unique_ptr<Callback> callback) = 0; 126 std::unique_ptr<Callback> callback) = 0;
128 }; 127 };
129 128
130 } // namespace net 129 } // namespace net
131 130
132 #endif // NET_QUIC_CRYPTO_PROOF_SOURCE_H_ 131 #endif // NET_QUIC_CRYPTO_PROOF_SOURCE_H_
OLDNEW
« no previous file with comments | « net/quic/core/crypto/local_strike_register_client_test.cc ('k') | net/quic/core/crypto/quic_crypto_client_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698