| 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 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 if (rv != 1) { | 595 if (rv != 1) { |
| 596 int ssl_error = SSL_get_error(ssl_, rv); | 596 int ssl_error = SSL_get_error(ssl_, rv); |
| 597 LOG(ERROR) << "Failed to export keying material;" | 597 LOG(ERROR) << "Failed to export keying material;" |
| 598 << " returned " << rv | 598 << " returned " << rv |
| 599 << ", SSL error code " << ssl_error; | 599 << ", SSL error code " << ssl_error; |
| 600 return MapOpenSSLError(ssl_error, err_tracer); | 600 return MapOpenSSLError(ssl_error, err_tracer); |
| 601 } | 601 } |
| 602 return OK; | 602 return OK; |
| 603 } | 603 } |
| 604 | 604 |
| 605 int SSLClientSocketOpenSSL::GetTLSUniqueChannelBinding(std::string* out) { | |
| 606 NOTIMPLEMENTED(); | |
| 607 return ERR_NOT_IMPLEMENTED; | |
| 608 } | |
| 609 | |
| 610 int SSLClientSocketOpenSSL::Connect(const CompletionCallback& callback) { | 605 int SSLClientSocketOpenSSL::Connect(const CompletionCallback& callback) { |
| 611 // It is an error to create an SSLClientSocket whose context has no | 606 // It is an error to create an SSLClientSocket whose context has no |
| 612 // TransportSecurityState. | 607 // TransportSecurityState. |
| 613 DCHECK(transport_security_state_); | 608 DCHECK(transport_security_state_); |
| 614 | 609 |
| 615 // Although StreamSocket does allow calling Connect() after Disconnect(), | 610 // Although StreamSocket does allow calling Connect() after Disconnect(), |
| 616 // this has never worked for layered sockets. CHECK to detect any consumers | 611 // this has never worked for layered sockets. CHECK to detect any consumers |
| 617 // reconnecting an SSL socket. | 612 // reconnecting an SSL socket. |
| 618 // | 613 // |
| 619 // TODO(davidben,mmenke): Remove this API feature. See | 614 // TODO(davidben,mmenke): Remove this API feature. See |
| (...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2347 tb_was_negotiated_ = true; | 2342 tb_was_negotiated_ = true; |
| 2348 return 1; | 2343 return 1; |
| 2349 } | 2344 } |
| 2350 } | 2345 } |
| 2351 | 2346 |
| 2352 *out_alert_value = SSL_AD_ILLEGAL_PARAMETER; | 2347 *out_alert_value = SSL_AD_ILLEGAL_PARAMETER; |
| 2353 return 0; | 2348 return 0; |
| 2354 } | 2349 } |
| 2355 | 2350 |
| 2356 } // namespace net | 2351 } // namespace net |
| OLD | NEW |