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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 scoped_refptr<base::SequencedTaskRunner> nss_task_runner_; | 777 scoped_refptr<base::SequencedTaskRunner> nss_task_runner_; |
778 | 778 |
779 // Dereferenced only on the network task runner, but bound to tasks destined | 779 // Dereferenced only on the network task runner, but bound to tasks destined |
780 // for the network task runner from the NSS task runner. | 780 // for the network task runner from the NSS task runner. |
781 base::WeakPtr<BoundNetLog> weak_net_log_; | 781 base::WeakPtr<BoundNetLog> weak_net_log_; |
782 | 782 |
783 // Written on the network task runner by the |channel_id_service_|, | 783 // Written on the network task runner by the |channel_id_service_|, |
784 // prior to invoking OnHandshakeIOComplete. | 784 // prior to invoking OnHandshakeIOComplete. |
785 // Read on the NSS task runner when once OnHandshakeIOComplete is invoked | 785 // Read on the NSS task runner when once OnHandshakeIOComplete is invoked |
786 // on the NSS task runner. | 786 // on the NSS task runner. |
787 scoped_ptr<crypto::ECPrivateKey> channel_id_key_; | 787 std::unique_ptr<crypto::ECPrivateKey> channel_id_key_; |
788 | 788 |
789 DISALLOW_COPY_AND_ASSIGN(Core); | 789 DISALLOW_COPY_AND_ASSIGN(Core); |
790 }; | 790 }; |
791 | 791 |
792 SSLClientSocketNSS::Core::Core( | 792 SSLClientSocketNSS::Core::Core( |
793 base::SequencedTaskRunner* network_task_runner, | 793 base::SequencedTaskRunner* network_task_runner, |
794 base::SequencedTaskRunner* nss_task_runner, | 794 base::SequencedTaskRunner* nss_task_runner, |
795 ClientSocketHandle* transport, | 795 ClientSocketHandle* transport, |
796 const HostPortPair& host_and_port, | 796 const HostPortPair& host_and_port, |
797 const SSLConfig& ssl_config, | 797 const SSLConfig& ssl_config, |
(...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2347 NetLog::TYPE_SSL_CHANNEL_ID_PROVIDED)); | 2347 NetLog::TYPE_SSL_CHANNEL_ID_PROVIDED)); |
2348 nss_handshake_state_.channel_id_sent = true; | 2348 nss_handshake_state_.channel_id_sent = true; |
2349 // Update the network task runner's view of the handshake state now that | 2349 // Update the network task runner's view of the handshake state now that |
2350 // channel id has been sent. | 2350 // channel id has been sent. |
2351 PostOrRunCallback( | 2351 PostOrRunCallback( |
2352 FROM_HERE, base::Bind(&Core::OnHandshakeStateUpdated, this, | 2352 FROM_HERE, base::Bind(&Core::OnHandshakeStateUpdated, this, |
2353 nss_handshake_state_)); | 2353 nss_handshake_state_)); |
2354 } | 2354 } |
2355 | 2355 |
2356 SSLClientSocketNSS::SSLClientSocketNSS( | 2356 SSLClientSocketNSS::SSLClientSocketNSS( |
2357 scoped_ptr<ClientSocketHandle> transport_socket, | 2357 std::unique_ptr<ClientSocketHandle> transport_socket, |
2358 const HostPortPair& host_and_port, | 2358 const HostPortPair& host_and_port, |
2359 const SSLConfig& ssl_config, | 2359 const SSLConfig& ssl_config, |
2360 const SSLClientSocketContext& context) | 2360 const SSLClientSocketContext& context) |
2361 : transport_(std::move(transport_socket)), | 2361 : transport_(std::move(transport_socket)), |
2362 host_and_port_(host_and_port), | 2362 host_and_port_(host_and_port), |
2363 ssl_config_(ssl_config), | 2363 ssl_config_(ssl_config), |
2364 cert_verifier_(context.cert_verifier), | 2364 cert_verifier_(context.cert_verifier), |
2365 cert_transparency_verifier_(context.cert_transparency_verifier), | 2365 cert_transparency_verifier_(context.cert_transparency_verifier), |
2366 channel_id_service_(context.channel_id_service), | 2366 channel_id_service_(context.channel_id_service), |
2367 ssl_session_cache_shard_(context.ssl_session_cache_shard), | 2367 ssl_session_cache_shard_(context.ssl_session_cache_shard), |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3180 return core_->GetChannelIDKey(); | 3180 return core_->GetChannelIDKey(); |
3181 } | 3181 } |
3182 | 3182 |
3183 SSLFailureState SSLClientSocketNSS::GetSSLFailureState() const { | 3183 SSLFailureState SSLClientSocketNSS::GetSSLFailureState() const { |
3184 if (completed_handshake_) | 3184 if (completed_handshake_) |
3185 return SSL_FAILURE_NONE; | 3185 return SSL_FAILURE_NONE; |
3186 return SSL_FAILURE_UNKNOWN; | 3186 return SSL_FAILURE_UNKNOWN; |
3187 } | 3187 } |
3188 | 3188 |
3189 } // namespace net | 3189 } // namespace net |
OLD | NEW |