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

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

Issue 9478016: Merge 123620 - Set SSLInfo.client_cert_sent when origin bound cert was sent. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1025/src/
Patch Set: 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.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include <map> 8 #include <map>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 void SSLClientSocketWin::GetSSLInfo(SSLInfo* ssl_info) { 420 void SSLClientSocketWin::GetSSLInfo(SSLInfo* ssl_info) {
421 ssl_info->Reset(); 421 ssl_info->Reset();
422 if (!server_cert_) 422 if (!server_cert_)
423 return; 423 return;
424 424
425 ssl_info->cert = server_cert_; 425 ssl_info->cert = server_cert_;
426 ssl_info->cert_status = server_cert_verify_result_.cert_status; 426 ssl_info->cert_status = server_cert_verify_result_.cert_status;
427 ssl_info->public_key_hashes = server_cert_verify_result_.public_key_hashes; 427 ssl_info->public_key_hashes = server_cert_verify_result_.public_key_hashes;
428 ssl_info->is_issued_by_known_root = 428 ssl_info->is_issued_by_known_root =
429 server_cert_verify_result_.is_issued_by_known_root; 429 server_cert_verify_result_.is_issued_by_known_root;
430 ssl_info->client_cert_sent = 430 ssl_info->client_cert_sent = WasOriginBoundCertSent() ||
431 ssl_config_.send_client_cert && ssl_config_.client_cert; 431 (ssl_config_.send_client_cert && ssl_config_.client_cert);
432 SecPkgContext_ConnectionInfo connection_info; 432 SecPkgContext_ConnectionInfo connection_info;
433 SECURITY_STATUS status = QueryContextAttributes( 433 SECURITY_STATUS status = QueryContextAttributes(
434 &ctxt_, SECPKG_ATTR_CONNECTION_INFO, &connection_info); 434 &ctxt_, SECPKG_ATTR_CONNECTION_INFO, &connection_info);
435 if (status == SEC_E_OK) { 435 if (status == SEC_E_OK) {
436 // TODO(wtc): compute the overall security strength, taking into account 436 // TODO(wtc): compute the overall security strength, taking into account
437 // dwExchStrength and dwHashStrength. dwExchStrength needs to be 437 // dwExchStrength and dwHashStrength. dwExchStrength needs to be
438 // normalized. 438 // normalized.
439 ssl_info->security_bits = connection_info.dwCipherStrength; 439 ssl_info->security_bits = connection_info.dwCipherStrength;
440 } 440 }
441 // SecPkgContext_CipherInfo comes from CNG and is available on Vista or 441 // SecPkgContext_CipherInfo comes from CNG and is available on Vista or
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA); 1567 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA);
1568 } 1568 }
1569 1569
1570 void SSLClientSocketWin::FreeSendBuffer() { 1570 void SSLClientSocketWin::FreeSendBuffer() {
1571 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer); 1571 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer);
1572 DCHECK(status == SEC_E_OK); 1572 DCHECK(status == SEC_E_OK);
1573 memset(&send_buffer_, 0, sizeof(send_buffer_)); 1573 memset(&send_buffer_, 0, sizeof(send_buffer_));
1574 } 1574 }
1575 1575
1576 } // namespace net 1576 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_openssl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698