| OLD | NEW |
| 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/ssl.h> | 9 #include <openssl/ssl.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "net/ssl/ssl_client_cert_type.h" | 27 #include "net/ssl/ssl_client_cert_type.h" |
| 28 #include "net/ssl/ssl_config_service.h" | 28 #include "net/ssl/ssl_config_service.h" |
| 29 #include "net/ssl/ssl_failure_state.h" | 29 #include "net/ssl/ssl_failure_state.h" |
| 30 | 30 |
| 31 namespace net { | 31 namespace net { |
| 32 | 32 |
| 33 class CertVerifier; | 33 class CertVerifier; |
| 34 class CTVerifier; | 34 class CTVerifier; |
| 35 class SSLCertRequestInfo; | 35 class SSLCertRequestInfo; |
| 36 class SSLInfo; | 36 class SSLInfo; |
| 37 class SSLPrivateKey; | |
| 38 | 37 |
| 39 // An SSL client socket implemented with OpenSSL. | 38 // An SSL client socket implemented with OpenSSL. |
| 40 class SSLClientSocketOpenSSL : public SSLClientSocket { | 39 class SSLClientSocketOpenSSL : public SSLClientSocket { |
| 41 public: | 40 public: |
| 42 // Takes ownership of the transport_socket, which may already be connected. | 41 // Takes ownership of the transport_socket, which may already be connected. |
| 43 // The given hostname will be compared with the name(s) in the server's | 42 // The given hostname will be compared with the name(s) in the server's |
| 44 // certificate during the SSL handshake. ssl_config specifies the SSL | 43 // certificate during the SSL handshake. ssl_config specifies the SSL |
| 45 // settings. | 44 // settings. |
| 46 SSLClientSocketOpenSSL(scoped_ptr<ClientSocketHandle> transport_socket, | 45 SSLClientSocketOpenSSL(scoped_ptr<ClientSocketHandle> transport_socket, |
| 47 const HostPortPair& host_and_port, | 46 const HostPortPair& host_and_port, |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 // True if the current session was newly-established, but the certificate had | 316 // True if the current session was newly-established, but the certificate had |
| 318 // not yet been verified externally, so it cannot be inserted into the cache | 317 // not yet been verified externally, so it cannot be inserted into the cache |
| 319 // until later. | 318 // until later. |
| 320 bool session_pending_; | 319 bool session_pending_; |
| 321 // True if the initial handshake's certificate has been verified. | 320 // True if the initial handshake's certificate has been verified. |
| 322 bool certificate_verified_; | 321 bool certificate_verified_; |
| 323 // The request handle for |channel_id_service_|. | 322 // The request handle for |channel_id_service_|. |
| 324 ChannelIDService::Request channel_id_request_; | 323 ChannelIDService::Request channel_id_request_; |
| 325 SSLFailureState ssl_failure_state_; | 324 SSLFailureState ssl_failure_state_; |
| 326 | 325 |
| 327 scoped_ptr<SSLPrivateKey> private_key_; | |
| 328 int signature_result_; | 326 int signature_result_; |
| 329 std::vector<uint8_t> signature_; | 327 std::vector<uint8_t> signature_; |
| 330 | 328 |
| 331 TransportSecurityState* transport_security_state_; | 329 TransportSecurityState* transport_security_state_; |
| 332 | 330 |
| 333 CertPolicyEnforcer* const policy_enforcer_; | 331 CertPolicyEnforcer* const policy_enforcer_; |
| 334 | 332 |
| 335 // pinning_failure_log contains a message produced by | 333 // pinning_failure_log contains a message produced by |
| 336 // TransportSecurityState::CheckPublicKeyPins in the event of a | 334 // TransportSecurityState::CheckPublicKeyPins in the event of a |
| 337 // pinning failure. It is a (somewhat) human-readable string. | 335 // pinning failure. It is a (somewhat) human-readable string. |
| 338 std::string pinning_failure_log_; | 336 std::string pinning_failure_log_; |
| 339 | 337 |
| 340 BoundNetLog net_log_; | 338 BoundNetLog net_log_; |
| 341 base::WeakPtrFactory<SSLClientSocketOpenSSL> weak_factory_; | 339 base::WeakPtrFactory<SSLClientSocketOpenSSL> weak_factory_; |
| 342 }; | 340 }; |
| 343 | 341 |
| 344 } // namespace net | 342 } // namespace net |
| 345 | 343 |
| 346 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ | 344 #endif // NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_ |
| OLD | NEW |