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

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

Issue 12680003: net: split net/ssl out of net/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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 | Annotate | Revision Log
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 // 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 <openssl/ssl.h>
11 #include <openssl/err.h> 10 #include <openssl/err.h>
12 #include <openssl/opensslv.h> 11 #include <openssl/opensslv.h>
12 #include <openssl/ssl.h>
13 13
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/callback_helpers.h" 15 #include "base/callback_helpers.h"
16 #include "base/memory/singleton.h" 16 #include "base/memory/singleton.h"
17 #include "base/metrics/histogram.h" 17 #include "base/metrics/histogram.h"
18 #include "base/synchronization/lock.h" 18 #include "base/synchronization/lock.h"
19 #include "crypto/openssl_util.h" 19 #include "crypto/openssl_util.h"
20 #include "net/base/cert_verifier.h" 20 #include "net/base/cert_verifier.h"
21 #include "net/base/net_errors.h" 21 #include "net/base/net_errors.h"
22 #include "net/base/openssl_client_key_store.h" 22 #include "net/base/openssl_client_key_store.h"
23 #include "net/base/single_request_cert_verifier.h" 23 #include "net/base/single_request_cert_verifier.h"
24 #include "net/base/ssl_cert_request_info.h"
25 #include "net/base/ssl_connection_status_flags.h"
26 #include "net/base/ssl_info.h"
27 #include "net/base/x509_certificate_net_log_param.h" 24 #include "net/base/x509_certificate_net_log_param.h"
28 #include "net/socket/ssl_error_params.h" 25 #include "net/socket/ssl_error_params.h"
26 #include "net/ssl/ssl_cert_request_info.h"
27 #include "net/ssl/ssl_connection_status_flags.h"
28 #include "net/ssl/ssl_info.h"
29 29
30 namespace net { 30 namespace net {
31 31
32 namespace { 32 namespace {
33 33
34 // Enable this to see logging for state machine state transitions. 34 // Enable this to see logging for state machine state transitions.
35 #if 0 35 #if 0
36 #define GotoState(s) do { DVLOG(2) << (void *)this << " " << __FUNCTION__ << \ 36 #define GotoState(s) do { DVLOG(2) << (void *)this << " " << __FUNCTION__ << \
37 " jump to state " << s; \ 37 " jump to state " << s; \
38 next_handshake_state_ = s; } while (0) 38 next_handshake_state_ = s; } while (0)
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1422 net_log_.AddByteTransferEvent(NetLog::TYPE_SSL_SOCKET_BYTES_SENT, rv, 1422 net_log_.AddByteTransferEvent(NetLog::TYPE_SSL_SOCKET_BYTES_SENT, rv,
1423 user_write_buf_->data()); 1423 user_write_buf_->data());
1424 return rv; 1424 return rv;
1425 } 1425 }
1426 1426
1427 int err = SSL_get_error(ssl_, rv); 1427 int err = SSL_get_error(ssl_, rv);
1428 return MapOpenSSLError(err, err_tracer); 1428 return MapOpenSSLError(err, err_tracer);
1429 } 1429 }
1430 1430
1431 } // namespace net 1431 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_openssl.h ('k') | net/socket/ssl_client_socket_openssl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698