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

Side by Side Diff: net/socket/ssl_client_socket_win.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_win.h ('k') | net/socket/ssl_server_socket_unittest.cc » ('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 #include "net/socket/ssl_client_socket_win.h" 5 #include "net/socket/ssl_client_socket_win.h"
6 6
7 #include <schnlsp.h> 7 #include <schnlsp.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 void SSLClientSocketWin::GetSSLInfo(SSLInfo* ssl_info) { 405 void SSLClientSocketWin::GetSSLInfo(SSLInfo* ssl_info) {
406 ssl_info->Reset(); 406 ssl_info->Reset();
407 if (!server_cert_) 407 if (!server_cert_)
408 return; 408 return;
409 409
410 ssl_info->cert = server_cert_verify_result_.verified_cert; 410 ssl_info->cert = server_cert_verify_result_.verified_cert;
411 ssl_info->cert_status = server_cert_verify_result_.cert_status; 411 ssl_info->cert_status = server_cert_verify_result_.cert_status;
412 ssl_info->public_key_hashes = server_cert_verify_result_.public_key_hashes; 412 ssl_info->public_key_hashes = server_cert_verify_result_.public_key_hashes;
413 ssl_info->is_issued_by_known_root = 413 ssl_info->is_issued_by_known_root =
414 server_cert_verify_result_.is_issued_by_known_root; 414 server_cert_verify_result_.is_issued_by_known_root;
415 ssl_info->client_cert_sent = WasOriginBoundCertSent() || 415 ssl_info->client_cert_sent = WasDomainBoundCertSent() ||
416 (ssl_config_.send_client_cert && ssl_config_.client_cert); 416 (ssl_config_.send_client_cert && ssl_config_.client_cert);
417 SecPkgContext_ConnectionInfo connection_info; 417 SecPkgContext_ConnectionInfo connection_info;
418 SECURITY_STATUS status = QueryContextAttributes( 418 SECURITY_STATUS status = QueryContextAttributes(
419 &ctxt_, SECPKG_ATTR_CONNECTION_INFO, &connection_info); 419 &ctxt_, SECPKG_ATTR_CONNECTION_INFO, &connection_info);
420 if (status == SEC_E_OK) { 420 if (status == SEC_E_OK) {
421 // TODO(wtc): compute the overall security strength, taking into account 421 // TODO(wtc): compute the overall security strength, taking into account
422 // dwExchStrength and dwHashStrength. dwExchStrength needs to be 422 // dwExchStrength and dwHashStrength. dwExchStrength needs to be
423 // normalized. 423 // normalized.
424 ssl_info->security_bits = connection_info.dwCipherStrength; 424 ssl_info->security_bits = connection_info.dwCipherStrength;
425 } 425 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 } 548 }
549 549
550 SSLClientSocket::NextProtoStatus 550 SSLClientSocket::NextProtoStatus
551 SSLClientSocketWin::GetNextProto(std::string* proto, 551 SSLClientSocketWin::GetNextProto(std::string* proto,
552 std::string* server_protos) { 552 std::string* server_protos) {
553 proto->clear(); 553 proto->clear();
554 server_protos->clear(); 554 server_protos->clear();
555 return kNextProtoUnsupported; 555 return kNextProtoUnsupported;
556 } 556 }
557 557
558 OriginBoundCertService* SSLClientSocketWin::GetOriginBoundCertService() const { 558 ServerBoundCertService* SSLClientSocketWin::GetServerBoundCertService() const {
559 return NULL; 559 return NULL;
560 } 560 }
561 561
562 int SSLClientSocketWin::Connect(const CompletionCallback& callback) { 562 int SSLClientSocketWin::Connect(const CompletionCallback& callback) {
563 DCHECK(transport_.get()); 563 DCHECK(transport_.get());
564 DCHECK(next_state_ == STATE_NONE); 564 DCHECK(next_state_ == STATE_NONE);
565 DCHECK(user_connect_callback_.is_null()); 565 DCHECK(user_connect_callback_.is_null());
566 566
567 net_log_.BeginEvent(NetLog::TYPE_SSL_CONNECT, NULL); 567 net_log_.BeginEvent(NetLog::TYPE_SSL_CONNECT, NULL);
568 568
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA); 1592 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA);
1593 } 1593 }
1594 1594
1595 void SSLClientSocketWin::FreeSendBuffer() { 1595 void SSLClientSocketWin::FreeSendBuffer() {
1596 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer); 1596 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer);
1597 DCHECK(status == SEC_E_OK); 1597 DCHECK(status == SEC_E_OK);
1598 memset(&send_buffer_, 0, sizeof(send_buffer_)); 1598 memset(&send_buffer_, 0, sizeof(send_buffer_));
1599 } 1599 }
1600 1600
1601 } // namespace net 1601 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_win.h ('k') | net/socket/ssl_server_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698