| 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 <errno.h> | 10 #include <errno.h> |
| (...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 614 ssl_info->handshake_type = SSL_session_reused(ssl_) ? | 614 ssl_info->handshake_type = SSL_session_reused(ssl_) ? |
| 615 SSLInfo::HANDSHAKE_RESUME : SSLInfo::HANDSHAKE_FULL; | 615 SSLInfo::HANDSHAKE_RESUME : SSLInfo::HANDSHAKE_FULL; |
| 616 | 616 |
| 617 DVLOG(3) << "Encoded connection status: cipher suite = " | 617 DVLOG(3) << "Encoded connection status: cipher suite = " |
| 618 << SSLConnectionStatusToCipherSuite(ssl_info->connection_status) | 618 << SSLConnectionStatusToCipherSuite(ssl_info->connection_status) |
| 619 << " version = " | 619 << " version = " |
| 620 << SSLConnectionStatusToVersion(ssl_info->connection_status); | 620 << SSLConnectionStatusToVersion(ssl_info->connection_status); |
| 621 return true; | 621 return true; |
| 622 } | 622 } |
| 623 | 623 |
| 624 void SSLClientSocketOpenSSL::GetConnectionAttempts( |
| 625 ConnectionAttempts* out) const { |
| 626 out->clear(); |
| 627 } |
| 628 |
| 624 int SSLClientSocketOpenSSL::Read(IOBuffer* buf, | 629 int SSLClientSocketOpenSSL::Read(IOBuffer* buf, |
| 625 int buf_len, | 630 int buf_len, |
| 626 const CompletionCallback& callback) { | 631 const CompletionCallback& callback) { |
| 627 user_read_buf_ = buf; | 632 user_read_buf_ = buf; |
| 628 user_read_buf_len_ = buf_len; | 633 user_read_buf_len_ = buf_len; |
| 629 | 634 |
| 630 int rv = DoReadLoop(); | 635 int rv = DoReadLoop(); |
| 631 | 636 |
| 632 if (rv == ERR_IO_PENDING) { | 637 if (rv == ERR_IO_PENDING) { |
| 633 user_read_callback_ = callback; | 638 user_read_callback_ = callback; |
| (...skipping 1264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1898 } | 1903 } |
| 1899 return false; | 1904 return false; |
| 1900 } | 1905 } |
| 1901 | 1906 |
| 1902 scoped_refptr<X509Certificate> | 1907 scoped_refptr<X509Certificate> |
| 1903 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { | 1908 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { |
| 1904 return server_cert_; | 1909 return server_cert_; |
| 1905 } | 1910 } |
| 1906 | 1911 |
| 1907 } // namespace net | 1912 } // namespace net |
| OLD | NEW |