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 // OpenSSL binding for SSLClientSocket. The class layout and general principle | 5 // OpenSSL binding for SSLClientSocket. The class layout and general principle |
6 // of operation is derived from SSLClientSocketNSS. | 6 // of operation is derived from SSLClientSocketNSS. |
7 | 7 |
8 #include "net/socket/ssl_client_socket_openssl.h" | 8 #include "net/socket/ssl_client_socket_openssl.h" |
9 | 9 |
10 #include <errno.h> | 10 #include <errno.h> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #include "net/ssl/ssl_connection_status_flags.h" | 51 #include "net/ssl/ssl_connection_status_flags.h" |
52 #include "net/ssl/ssl_failure_state.h" | 52 #include "net/ssl/ssl_failure_state.h" |
53 #include "net/ssl/ssl_info.h" | 53 #include "net/ssl/ssl_info.h" |
54 #include "net/ssl/ssl_private_key.h" | 54 #include "net/ssl/ssl_private_key.h" |
55 #include "net/ssl/token_binding.h" | 55 #include "net/ssl/token_binding.h" |
56 | 56 |
57 #if !defined(OS_NACL) | 57 #if !defined(OS_NACL) |
58 #include "net/ssl/ssl_key_logger.h" | 58 #include "net/ssl/ssl_key_logger.h" |
59 #endif | 59 #endif |
60 | 60 |
61 #if defined(USE_NSS_CERTS) || defined(OS_IOS) | 61 #if defined(USE_NSS_VERIFIER) |
62 #include "net/cert_net/nss_ocsp.h" | 62 #include "net/cert_net/nss_ocsp.h" |
63 #endif | 63 #endif |
64 | 64 |
65 namespace net { | 65 namespace net { |
66 | 66 |
67 namespace { | 67 namespace { |
68 | 68 |
69 // Enable this to see logging for state machine state transitions. | 69 // Enable this to see logging for state machine state transitions. |
70 #if 0 | 70 #if 0 |
71 #define GotoState(s) do { DVLOG(2) << (void *)this << " " << __FUNCTION__ << \ | 71 #define GotoState(s) do { DVLOG(2) << (void *)this << " " << __FUNCTION__ << \ |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 } | 880 } |
881 | 881 |
882 int SSLClientSocketOpenSSL::SetSendBufferSize(int32_t size) { | 882 int SSLClientSocketOpenSSL::SetSendBufferSize(int32_t size) { |
883 return transport_->socket()->SetSendBufferSize(size); | 883 return transport_->socket()->SetSendBufferSize(size); |
884 } | 884 } |
885 | 885 |
886 int SSLClientSocketOpenSSL::Init() { | 886 int SSLClientSocketOpenSSL::Init() { |
887 DCHECK(!ssl_); | 887 DCHECK(!ssl_); |
888 DCHECK(!transport_bio_); | 888 DCHECK(!transport_bio_); |
889 | 889 |
890 #if defined(USE_NSS_CERTS) || defined(OS_IOS) | 890 #if defined(USE_NSS_VERIFIER) |
891 if (ssl_config_.cert_io_enabled) { | 891 if (ssl_config_.cert_io_enabled) { |
892 // TODO(davidben): Move this out of SSLClientSocket. See | 892 // TODO(davidben): Move this out of SSLClientSocket. See |
893 // https://crbug.com/539520. | 893 // https://crbug.com/539520. |
894 EnsureNSSHttpIOInit(); | 894 EnsureNSSHttpIOInit(); |
895 } | 895 } |
896 #endif | 896 #endif |
897 | 897 |
898 SSLContext* context = SSLContext::GetInstance(); | 898 SSLContext* context = SSLContext::GetInstance(); |
899 crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE); | 899 crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE); |
900 | 900 |
(...skipping 1410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2311 tb_was_negotiated_ = true; | 2311 tb_was_negotiated_ = true; |
2312 return 1; | 2312 return 1; |
2313 } | 2313 } |
2314 } | 2314 } |
2315 | 2315 |
2316 *out_alert_value = SSL_AD_ILLEGAL_PARAMETER; | 2316 *out_alert_value = SSL_AD_ILLEGAL_PARAMETER; |
2317 return 0; | 2317 return 0; |
2318 } | 2318 } |
2319 | 2319 |
2320 } // namespace net | 2320 } // namespace net |
OLD | NEW |