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 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived | 5 // This file includes code SSLClientSocketNSS::DoVerifyCertComplete() derived |
6 // from AuthCertificateCallback() in | 6 // from AuthCertificateCallback() in |
7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. | 7 // mozilla/security/manager/ssl/src/nsNSSCallbacks.cpp. |
8 | 8 |
9 /* ***** BEGIN LICENSE BLOCK ***** | 9 /* ***** BEGIN LICENSE BLOCK ***** |
10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 10 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 #include <pk11pub.h> | 56 #include <pk11pub.h> |
57 #include <secerr.h> | 57 #include <secerr.h> |
58 #include <sechash.h> | 58 #include <sechash.h> |
59 #include <ssl.h> | 59 #include <ssl.h> |
60 #include <sslerr.h> | 60 #include <sslerr.h> |
61 #include <sslproto.h> | 61 #include <sslproto.h> |
62 | 62 |
63 #include <algorithm> | 63 #include <algorithm> |
64 #include <limits> | 64 #include <limits> |
65 #include <map> | 65 #include <map> |
| 66 #include <utility> |
66 | 67 |
67 #include "base/bind.h" | 68 #include "base/bind.h" |
68 #include "base/bind_helpers.h" | 69 #include "base/bind_helpers.h" |
69 #include "base/callback_helpers.h" | 70 #include "base/callback_helpers.h" |
70 #include "base/compiler_specific.h" | 71 #include "base/compiler_specific.h" |
71 #include "base/location.h" | 72 #include "base/location.h" |
72 #include "base/logging.h" | 73 #include "base/logging.h" |
73 #include "base/macros.h" | 74 #include "base/macros.h" |
74 #include "base/metrics/histogram_macros.h" | 75 #include "base/metrics/histogram_macros.h" |
75 #include "base/single_thread_task_runner.h" | 76 #include "base/single_thread_task_runner.h" |
(...skipping 2276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2352 PostOrRunCallback( | 2353 PostOrRunCallback( |
2353 FROM_HERE, base::Bind(&Core::OnHandshakeStateUpdated, this, | 2354 FROM_HERE, base::Bind(&Core::OnHandshakeStateUpdated, this, |
2354 nss_handshake_state_)); | 2355 nss_handshake_state_)); |
2355 } | 2356 } |
2356 | 2357 |
2357 SSLClientSocketNSS::SSLClientSocketNSS( | 2358 SSLClientSocketNSS::SSLClientSocketNSS( |
2358 scoped_ptr<ClientSocketHandle> transport_socket, | 2359 scoped_ptr<ClientSocketHandle> transport_socket, |
2359 const HostPortPair& host_and_port, | 2360 const HostPortPair& host_and_port, |
2360 const SSLConfig& ssl_config, | 2361 const SSLConfig& ssl_config, |
2361 const SSLClientSocketContext& context) | 2362 const SSLClientSocketContext& context) |
2362 : transport_(transport_socket.Pass()), | 2363 : transport_(std::move(transport_socket)), |
2363 host_and_port_(host_and_port), | 2364 host_and_port_(host_and_port), |
2364 ssl_config_(ssl_config), | 2365 ssl_config_(ssl_config), |
2365 cert_verifier_(context.cert_verifier), | 2366 cert_verifier_(context.cert_verifier), |
2366 cert_transparency_verifier_(context.cert_transparency_verifier), | 2367 cert_transparency_verifier_(context.cert_transparency_verifier), |
2367 channel_id_service_(context.channel_id_service), | 2368 channel_id_service_(context.channel_id_service), |
2368 ssl_session_cache_shard_(context.ssl_session_cache_shard), | 2369 ssl_session_cache_shard_(context.ssl_session_cache_shard), |
2369 completed_handshake_(false), | 2370 completed_handshake_(false), |
2370 next_handshake_state_(STATE_NONE), | 2371 next_handshake_state_(STATE_NONE), |
2371 disconnected_(false), | 2372 disconnected_(false), |
2372 nss_fd_(NULL), | 2373 nss_fd_(NULL), |
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3178 return channel_id_service_; | 3179 return channel_id_service_; |
3179 } | 3180 } |
3180 | 3181 |
3181 SSLFailureState SSLClientSocketNSS::GetSSLFailureState() const { | 3182 SSLFailureState SSLClientSocketNSS::GetSSLFailureState() const { |
3182 if (completed_handshake_) | 3183 if (completed_handshake_) |
3183 return SSL_FAILURE_NONE; | 3184 return SSL_FAILURE_NONE; |
3184 return SSL_FAILURE_UNKNOWN; | 3185 return SSL_FAILURE_UNKNOWN; |
3185 } | 3186 } |
3186 | 3187 |
3187 } // namespace net | 3188 } // namespace net |
OLD | NEW |