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 2917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2928 SSLClientSocketNSS::GetNextProto(std::string* proto, | 2928 SSLClientSocketNSS::GetNextProto(std::string* proto, |
2929 std::string* server_protos) { | 2929 std::string* server_protos) { |
2930 *proto = core_->state().next_proto; | 2930 *proto = core_->state().next_proto; |
2931 *server_protos = core_->state().server_protos; | 2931 *server_protos = core_->state().server_protos; |
2932 return core_->state().next_proto_status; | 2932 return core_->state().next_proto_status; |
2933 } | 2933 } |
2934 | 2934 |
2935 int SSLClientSocketNSS::Connect(const CompletionCallback& callback) { | 2935 int SSLClientSocketNSS::Connect(const CompletionCallback& callback) { |
2936 EnterFunction(""); | 2936 EnterFunction(""); |
2937 DCHECK(transport_.get()); | 2937 DCHECK(transport_.get()); |
| 2938 // It is an error to create an SSLClientSocket whose context has no |
| 2939 // TransportSecurityState. |
| 2940 DCHECK(transport_security_state_); |
2938 DCHECK_EQ(STATE_NONE, next_handshake_state_); | 2941 DCHECK_EQ(STATE_NONE, next_handshake_state_); |
2939 DCHECK(user_connect_callback_.is_null()); | 2942 DCHECK(user_connect_callback_.is_null()); |
2940 DCHECK(!callback.is_null()); | 2943 DCHECK(!callback.is_null()); |
2941 | 2944 |
2942 EnsureThreadIdAssigned(); | 2945 EnsureThreadIdAssigned(); |
2943 | 2946 |
2944 net_log_.BeginEvent(NetLog::TYPE_SSL_CONNECT); | 2947 net_log_.BeginEvent(NetLog::TYPE_SSL_CONNECT); |
2945 | 2948 |
2946 int rv = Init(); | 2949 int rv = Init(); |
2947 if (rv != OK) { | 2950 if (rv != OK) { |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3554 EnsureThreadIdAssigned(); | 3557 EnsureThreadIdAssigned(); |
3555 base::AutoLock auto_lock(lock_); | 3558 base::AutoLock auto_lock(lock_); |
3556 return valid_thread_id_ == base::PlatformThread::CurrentId(); | 3559 return valid_thread_id_ == base::PlatformThread::CurrentId(); |
3557 } | 3560 } |
3558 | 3561 |
3559 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const { | 3562 ServerBoundCertService* SSLClientSocketNSS::GetServerBoundCertService() const { |
3560 return server_bound_cert_service_; | 3563 return server_bound_cert_service_; |
3561 } | 3564 } |
3562 | 3565 |
3563 } // namespace net | 3566 } // namespace net |
OLD | NEW |