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

Side by Side Diff: net/socket/ssl_client_socket_openssl.h

Issue 1378613004: Set Token-Binding HTTP header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tb-tls-ext-new
Patch Set: rebase Created 5 years, 2 months 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ 5 #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ 6 #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
7 7
8 #include <openssl/base.h> 8 #include <openssl/base.h>
9 #include <openssl/bytestring.h> 9 #include <openssl/bytestring.h>
10 #include <openssl/ssl.h> 10 #include <openssl/ssl.h>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 const HostPortPair& host_and_port() const { return host_and_port_; } 52 const HostPortPair& host_and_port() const { return host_and_port_; }
53 const std::string& ssl_session_cache_shard() const { 53 const std::string& ssl_session_cache_shard() const {
54 return ssl_session_cache_shard_; 54 return ssl_session_cache_shard_;
55 } 55 }
56 56
57 // SSLClientSocket implementation. 57 // SSLClientSocket implementation.
58 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override; 58 void GetSSLCertRequestInfo(SSLCertRequestInfo* cert_request_info) override;
59 NextProtoStatus GetNextProto(std::string* proto) const override; 59 NextProtoStatus GetNextProto(std::string* proto) const override;
60 ChannelIDService* GetChannelIDService() const override; 60 ChannelIDService* GetChannelIDService() const override;
61 std::string GetProvidedTokenBinding() override;
61 SSLFailureState GetSSLFailureState() const override; 62 SSLFailureState GetSSLFailureState() const override;
62 63
63 // SSLSocket implementation. 64 // SSLSocket implementation.
64 int ExportKeyingMaterial(const base::StringPiece& label, 65 int ExportKeyingMaterial(const base::StringPiece& label,
65 bool has_context, 66 bool has_context,
66 const base::StringPiece& context, 67 const base::StringPiece& context,
67 unsigned char* out, 68 unsigned char* out,
68 unsigned int outlen) override; 69 unsigned int outlen) override;
69 int GetTLSUniqueChannelBinding(std::string* out) override; 70 int GetTLSUniqueChannelBinding(std::string* out) override;
70 71
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 size_t max_out, 263 size_t max_out,
263 const EVP_MD* md, 264 const EVP_MD* md,
264 const uint8_t* in, 265 const uint8_t* in,
265 size_t in_len); 266 size_t in_len);
266 ssl_private_key_result_t PrivateKeySignCompleteCallback(uint8_t* out, 267 ssl_private_key_result_t PrivateKeySignCompleteCallback(uint8_t* out,
267 size_t* out_len, 268 size_t* out_len,
268 size_t max_out); 269 size_t max_out);
269 270
270 void OnPrivateKeySignComplete(Error error, 271 void OnPrivateKeySignComplete(Error error,
271 const std::vector<uint8_t>& signature); 272 const std::vector<uint8_t>& signature);
273 int BuildProvidedTokenBinding();
272 274
273 bool transport_send_busy_; 275 bool transport_send_busy_;
274 bool transport_recv_busy_; 276 bool transport_recv_busy_;
275 277
276 // Buffers which are shared by BoringSSL and SSLClientSocketOpenSSL. 278 // Buffers which are shared by BoringSSL and SSLClientSocketOpenSSL.
277 // GrowableIOBuffer is used to keep ownership and setting offset. 279 // GrowableIOBuffer is used to keep ownership and setting offset.
278 scoped_refptr<GrowableIOBuffer> send_buffer_; 280 scoped_refptr<GrowableIOBuffer> send_buffer_;
279 scoped_refptr<GrowableIOBuffer> recv_buffer_; 281 scoped_refptr<GrowableIOBuffer> recv_buffer_;
280 282
281 CompletionCallback user_connect_callback_; 283 CompletionCallback user_connect_callback_;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 scoped_ptr<CertVerifier::Request> cert_verifier_request_; 337 scoped_ptr<CertVerifier::Request> cert_verifier_request_;
336 base::TimeTicks start_cert_verification_time_; 338 base::TimeTicks start_cert_verification_time_;
337 339
338 // Certificate Transparency: Verifier and result holder. 340 // Certificate Transparency: Verifier and result holder.
339 ct::CTVerifyResult ct_verify_result_; 341 ct::CTVerifyResult ct_verify_result_;
340 CTVerifier* cert_transparency_verifier_; 342 CTVerifier* cert_transparency_verifier_;
341 343
342 // The service for retrieving Channel ID keys. May be NULL. 344 // The service for retrieving Channel ID keys. May be NULL.
343 ChannelIDService* channel_id_service_; 345 ChannelIDService* channel_id_service_;
344 TokenBindingExtension token_binding_extension_; 346 TokenBindingExtension token_binding_extension_;
347 std::string provided_token_binding_;
345 348
346 // OpenSSL stuff 349 // OpenSSL stuff
347 SSL* ssl_; 350 SSL* ssl_;
348 BIO* transport_bio_; 351 BIO* transport_bio_;
349 352
350 scoped_ptr<ClientSocketHandle> transport_; 353 scoped_ptr<ClientSocketHandle> transport_;
351 const HostPortPair host_and_port_; 354 const HostPortPair host_and_port_;
352 SSLConfig ssl_config_; 355 SSLConfig ssl_config_;
353 // ssl_session_cache_shard_ is an opaque string that partitions the SSL 356 // ssl_session_cache_shard_ is an opaque string that partitions the SSL
354 // session cache. i.e. sessions created with one value will not attempt to 357 // session cache. i.e. sessions created with one value will not attempt to
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 // pinning failure. It is a (somewhat) human-readable string. 403 // pinning failure. It is a (somewhat) human-readable string.
401 std::string pinning_failure_log_; 404 std::string pinning_failure_log_;
402 405
403 BoundNetLog net_log_; 406 BoundNetLog net_log_;
404 base::WeakPtrFactory<SSLClientSocketOpenSSL> weak_factory_; 407 base::WeakPtrFactory<SSLClientSocketOpenSSL> weak_factory_;
405 }; 408 };
406 409
407 } // namespace net 410 } // namespace net
408 411
409 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ 412 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698