Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: net/socket/ssl_client_socket_openssl.cc

Issue 9617039: Change Origin bound certs -> Domain bound certs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/ssl_client_socket_openssl.h ('k') | net/socket/ssl_client_socket_pool.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_verify_result_.verified_cert; 584 ssl_info->cert = server_cert_verify_result_.verified_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 = WasOriginBoundCertSent() || 590 ssl_info->client_cert_sent = WasDomainBoundCertSent() ||
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,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 return OK; 646 return OK;
647 } 647 }
648 648
649 SSLClientSocket::NextProtoStatus SSLClientSocketOpenSSL::GetNextProto( 649 SSLClientSocket::NextProtoStatus SSLClientSocketOpenSSL::GetNextProto(
650 std::string* proto, std::string* server_protos) { 650 std::string* proto, std::string* server_protos) {
651 *proto = npn_proto_; 651 *proto = npn_proto_;
652 *server_protos = server_protos_; 652 *server_protos = server_protos_;
653 return npn_status_; 653 return npn_status_;
654 } 654 }
655 655
656 OriginBoundCertService* 656 ServerBoundCertService*
657 SSLClientSocketOpenSSL::GetOriginBoundCertService() const { 657 SSLClientSocketOpenSSL::GetServerBoundCertService() const {
658 return NULL; 658 return NULL;
659 } 659 }
660 660
661 void SSLClientSocketOpenSSL::DoReadCallback(int rv) { 661 void SSLClientSocketOpenSSL::DoReadCallback(int rv) {
662 // Since Run may result in Read being called, clear |user_read_callback_| 662 // Since Run may result in Read being called, clear |user_read_callback_|
663 // up front. 663 // up front.
664 CompletionCallback c = user_read_callback_; 664 CompletionCallback c = user_read_callback_;
665 user_read_callback_.Reset(); 665 user_read_callback_.Reset();
666 user_read_buf_ = NULL; 666 user_read_buf_ = NULL;
667 user_read_buf_len_ = 0; 667 user_read_buf_len_ = 0;
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 net_log_.AddByteTransferEvent(NetLog::TYPE_SSL_SOCKET_BYTES_SENT, rv, 1299 net_log_.AddByteTransferEvent(NetLog::TYPE_SSL_SOCKET_BYTES_SENT, rv,
1300 user_write_buf_->data()); 1300 user_write_buf_->data());
1301 return rv; 1301 return rv;
1302 } 1302 }
1303 1303
1304 int err = SSL_get_error(ssl_, rv); 1304 int err = SSL_get_error(ssl_, rv);
1305 return MapOpenSSLError(err, err_tracer); 1305 return MapOpenSSLError(err, err_tracer);
1306 } 1306 }
1307 1307
1308 } // namespace net 1308 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_openssl.h ('k') | net/socket/ssl_client_socket_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698