| 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/ssl.h> | 10 #include <openssl/ssl.h> |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 ssl_info->Reset(); | 580 ssl_info->Reset(); |
| 581 if (!server_cert_) | 581 if (!server_cert_) |
| 582 return; | 582 return; |
| 583 | 583 |
| 584 ssl_info->cert = server_cert_; | 584 ssl_info->cert = server_cert_; |
| 585 ssl_info->cert_status = server_cert_verify_result_.cert_status; | 585 ssl_info->cert_status = server_cert_verify_result_.cert_status; |
| 586 ssl_info->is_issued_by_known_root = | 586 ssl_info->is_issued_by_known_root = |
| 587 server_cert_verify_result_.is_issued_by_known_root; | 587 server_cert_verify_result_.is_issued_by_known_root; |
| 588 ssl_info->public_key_hashes = | 588 ssl_info->public_key_hashes = |
| 589 server_cert_verify_result_.public_key_hashes; | 589 server_cert_verify_result_.public_key_hashes; |
| 590 ssl_info->client_cert_sent = | 590 ssl_info->client_cert_sent = WasOriginBoundCertSent() || |
| 591 ssl_config_.send_client_cert && ssl_config_.client_cert; | 591 (ssl_config_.send_client_cert && ssl_config_.client_cert); |
| 592 | 592 |
| 593 const SSL_CIPHER* cipher = SSL_get_current_cipher(ssl_); | 593 const SSL_CIPHER* cipher = SSL_get_current_cipher(ssl_); |
| 594 CHECK(cipher); | 594 CHECK(cipher); |
| 595 ssl_info->security_bits = SSL_CIPHER_get_bits(cipher, NULL); | 595 ssl_info->security_bits = SSL_CIPHER_get_bits(cipher, NULL); |
| 596 const COMP_METHOD* compression = SSL_get_current_compression(ssl_); | 596 const COMP_METHOD* compression = SSL_get_current_compression(ssl_); |
| 597 | 597 |
| 598 ssl_info->connection_status = EncodeSSLConnectionStatus( | 598 ssl_info->connection_status = EncodeSSLConnectionStatus( |
| 599 SSL_CIPHER_get_id(cipher), | 599 SSL_CIPHER_get_id(cipher), |
| 600 compression ? compression->type : 0, | 600 compression ? compression->type : 0, |
| 601 GetNetSSLVersion(ssl_)); | 601 GetNetSSLVersion(ssl_)); |
| (...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1277 net_log_.AddByteTransferEvent(NetLog::TYPE_SSL_SOCKET_BYTES_SENT, rv, | 1277 net_log_.AddByteTransferEvent(NetLog::TYPE_SSL_SOCKET_BYTES_SENT, rv, |
| 1278 user_write_buf_->data()); | 1278 user_write_buf_->data()); |
| 1279 return rv; | 1279 return rv; |
| 1280 } | 1280 } |
| 1281 | 1281 |
| 1282 int err = SSL_get_error(ssl_, rv); | 1282 int err = SSL_get_error(ssl_, rv); |
| 1283 return MapOpenSSLError(err, err_tracer); | 1283 return MapOpenSSLError(err, err_tracer); |
| 1284 } | 1284 } |
| 1285 | 1285 |
| 1286 } // namespace net | 1286 } // namespace net |
| OLD | NEW |