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

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

Issue 2589983002: Create a QUIC wrapper around scoped_refptr. (Closed)
Patch Set: rm = nullptr 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_CORE_CRYPTO_CRYPTO_HANDSHAKE_H_ 5 #ifndef NET_QUIC_CORE_CRYPTO_CRYPTO_HANDSHAKE_H_
6 #define NET_QUIC_CORE_CRYPTO_CRYPTO_HANDSHAKE_H_ 6 #define NET_QUIC_CORE_CRYPTO_CRYPTO_HANDSHAKE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // A CrypterPair contains the encrypter and decrypter for an encryption level. 93 // A CrypterPair contains the encrypter and decrypter for an encryption level.
94 struct QUIC_EXPORT_PRIVATE CrypterPair { 94 struct QUIC_EXPORT_PRIVATE CrypterPair {
95 CrypterPair(); 95 CrypterPair();
96 ~CrypterPair(); 96 ~CrypterPair();
97 std::unique_ptr<QuicEncrypter> encrypter; 97 std::unique_ptr<QuicEncrypter> encrypter;
98 std::unique_ptr<QuicDecrypter> decrypter; 98 std::unique_ptr<QuicDecrypter> decrypter;
99 }; 99 };
100 100
101 // Parameters negotiated by the crypto handshake. 101 // Parameters negotiated by the crypto handshake.
102 struct QUIC_EXPORT_PRIVATE QuicCryptoNegotiatedParameters 102 struct QUIC_EXPORT_PRIVATE QuicCryptoNegotiatedParameters
103 : public base::RefCounted<QuicCryptoNegotiatedParameters> { 103 : public QuicReferenceCounted {
104 // Initializes the members to 0 or empty values. 104 // Initializes the members to 0 or empty values.
105 QuicCryptoNegotiatedParameters(); 105 QuicCryptoNegotiatedParameters();
106 106
107 QuicTag key_exchange; 107 QuicTag key_exchange;
108 QuicTag aead; 108 QuicTag aead;
109 std::string initial_premaster_secret; 109 std::string initial_premaster_secret;
110 std::string forward_secure_premaster_secret; 110 std::string forward_secure_premaster_secret;
111 // initial_subkey_secret is used as the PRK input to the HKDF used when 111 // initial_subkey_secret is used as the PRK input to the HKDF used when
112 // performing key extraction that needs to happen before forward-secure keys 112 // performing key extraction that needs to happen before forward-secure keys
113 // are available. 113 // are available.
(...skipping 29 matching lines...) Expand all
143 bool x509_supported; 143 bool x509_supported;
144 144
145 // Used to generate cert chain when sending server config updates. 145 // Used to generate cert chain when sending server config updates.
146 std::string client_common_set_hashes; 146 std::string client_common_set_hashes;
147 std::string client_cached_cert_hashes; 147 std::string client_cached_cert_hashes;
148 148
149 // Default to false; set to true if the client indicates that it supports sct 149 // Default to false; set to true if the client indicates that it supports sct
150 // by sending CSCT tag with an empty value in client hello. 150 // by sending CSCT tag with an empty value in client hello.
151 bool sct_supported_by_client; 151 bool sct_supported_by_client;
152 152
153 private: 153 protected:
154 friend class base::RefCounted<QuicCryptoNegotiatedParameters>; 154 ~QuicCryptoNegotiatedParameters() override;
155 virtual ~QuicCryptoNegotiatedParameters();
156 }; 155 };
157 156
158 // QuicCryptoConfig contains common configuration between clients and servers. 157 // QuicCryptoConfig contains common configuration between clients and servers.
159 class QUIC_EXPORT_PRIVATE QuicCryptoConfig { 158 class QUIC_EXPORT_PRIVATE QuicCryptoConfig {
160 public: 159 public:
161 // kInitialLabel is a constant that is used when deriving the initial 160 // kInitialLabel is a constant that is used when deriving the initial
162 // (non-forward secure) keys for the connection in order to tie the resulting 161 // (non-forward secure) keys for the connection in order to tie the resulting
163 // key to this protocol. 162 // key to this protocol.
164 static const char kInitialLabel[]; 163 static const char kInitialLabel[];
165 164
(...skipping 21 matching lines...) Expand all
187 186
188 const CommonCertSets* common_cert_sets; 187 const CommonCertSets* common_cert_sets;
189 188
190 private: 189 private:
191 DISALLOW_COPY_AND_ASSIGN(QuicCryptoConfig); 190 DISALLOW_COPY_AND_ASSIGN(QuicCryptoConfig);
192 }; 191 };
193 192
194 } // namespace net 193 } // namespace net
195 194
196 #endif // NET_QUIC_CORE_CRYPTO_CRYPTO_HANDSHAKE_H_ 195 #endif // NET_QUIC_CORE_CRYPTO_CRYPTO_HANDSHAKE_H_
OLDNEW
« no previous file with comments | « net/quic/chromium/quic_chromium_client_stream_test.cc ('k') | net/quic/core/crypto/crypto_server_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698