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 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
769 } else { | 769 } else { |
770 if (rv > 0) | 770 if (rv > 0) |
771 was_ever_used_ = true; | 771 was_ever_used_ = true; |
772 user_write_buf_ = NULL; | 772 user_write_buf_ = NULL; |
773 user_write_buf_len_ = 0; | 773 user_write_buf_len_ = 0; |
774 } | 774 } |
775 | 775 |
776 return rv; | 776 return rv; |
777 } | 777 } |
778 | 778 |
779 bool SSLClientSocketOpenSSL::SetReceiveBufferSize(int32 size) { | 779 int SSLClientSocketOpenSSL::SetReceiveBufferSize(int32 size) { |
780 return transport_->socket()->SetReceiveBufferSize(size); | 780 return transport_->socket()->SetReceiveBufferSize(size); |
781 } | 781 } |
782 | 782 |
783 bool SSLClientSocketOpenSSL::SetSendBufferSize(int32 size) { | 783 int SSLClientSocketOpenSSL::SetSendBufferSize(int32 size) { |
784 return transport_->socket()->SetSendBufferSize(size); | 784 return transport_->socket()->SetSendBufferSize(size); |
785 } | 785 } |
786 | 786 |
787 bool SSLClientSocketOpenSSL::Init() { | 787 bool SSLClientSocketOpenSSL::Init() { |
788 DCHECK(!ssl_); | 788 DCHECK(!ssl_); |
789 DCHECK(!transport_bio_); | 789 DCHECK(!transport_bio_); |
790 | 790 |
791 SSLContext* context = SSLContext::GetInstance(); | 791 SSLContext* context = SSLContext::GetInstance(); |
792 crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE); | 792 crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE); |
793 | 793 |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1572 #endif | 1572 #endif |
1573 return SSL_TLSEXT_ERR_OK; | 1573 return SSL_TLSEXT_ERR_OK; |
1574 } | 1574 } |
1575 | 1575 |
1576 scoped_refptr<X509Certificate> | 1576 scoped_refptr<X509Certificate> |
1577 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { | 1577 SSLClientSocketOpenSSL::GetUnverifiedServerCertificateChain() const { |
1578 return server_cert_; | 1578 return server_cert_; |
1579 } | 1579 } |
1580 | 1580 |
1581 } // namespace net | 1581 } // namespace net |
OLD | NEW |