Chromium Code Reviews| 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 <openssl/err.h> | 10 #include <openssl/err.h> |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 386 const base::Closure& callback) { | 386 const base::Closure& callback) { |
| 387 error_callback_ = callback; | 387 error_callback_ = callback; |
| 388 } | 388 } |
| 389 | 389 |
| 390 void SSLClientSocketOpenSSL::SetIsLeader() { | 390 void SSLClientSocketOpenSSL::SetIsLeader() { |
| 391 is_leader_ = true; | 391 is_leader_ = true; |
| 392 } | 392 } |
| 393 | 393 |
| 394 void SSLClientSocketOpenSSL::OnSocketFailure() { | 394 void SSLClientSocketOpenSSL::OnSocketFailure() { |
| 395 if (is_leader_) | 395 if (is_leader_) |
| 396 error_callback_.Run(); | 396 base::MessageLoopForIO::current()->PostTask(FROM_HERE, error_callback_); |
|
wtc
2014/07/08 17:37:03
IMPORTANT: please verify that this task should sti
mshelley
2014/07/09 21:53:06
By "this object" do you mean the SSLClientSocketOp
Ryan Sleevi
2014/07/09 22:40:37
To be clear: The situation concerned is
Precondit
| |
| 397 } | 397 } |
| 398 | 398 |
| 399 void SSLClientSocketOpenSSL::GetSSLCertRequestInfo( | 399 void SSLClientSocketOpenSSL::GetSSLCertRequestInfo( |
| 400 SSLCertRequestInfo* cert_request_info) { | 400 SSLCertRequestInfo* cert_request_info) { |
| 401 cert_request_info->host_and_port = host_and_port_; | 401 cert_request_info->host_and_port = host_and_port_; |
| 402 cert_request_info->cert_authorities = cert_authorities_; | 402 cert_request_info->cert_authorities = cert_authorities_; |
| 403 cert_request_info->cert_key_types = cert_key_types_; | 403 cert_request_info->cert_key_types = cert_key_types_; |
| 404 } | 404 } |
| 405 | 405 |
| 406 SSLClientSocket::NextProtoStatus SSLClientSocketOpenSSL::GetNextProto( | 406 SSLClientSocket::NextProtoStatus SSLClientSocketOpenSSL::GetNextProto( |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1464 DVLOG(2) << "next protocol: '" << npn_proto_ << "' status: " << npn_status_; | 1464 DVLOG(2) << "next protocol: '" << npn_proto_ << "' status: " << npn_status_; |
| 1465 return SSL_TLSEXT_ERR_OK; | 1465 return SSL_TLSEXT_ERR_OK; |
| 1466 } | 1466 } |
| 1467 | 1467 |
| 1468 scoped_refptr<X509Certificate> | 1468 scoped_refptr<X509Certificate> |
| 1469 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { | 1469 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { |
| 1470 return server_cert_; | 1470 return server_cert_; |
| 1471 } | 1471 } |
| 1472 | 1472 |
| 1473 } // namespace net | 1473 } // namespace net |
| OLD | NEW |