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

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

Issue 10539094: NetLogEventParameter to Callback refactoring 1, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove unneeded line Created 8 years, 6 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
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 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 server_cert_handle->hCertStore, intermediate))) { 1556 server_cert_handle->hCertStore, intermediate))) {
1557 if (!X509Certificate::IsSameOSCert(server_cert_handle, intermediate)) 1557 if (!X509Certificate::IsSameOSCert(server_cert_handle, intermediate))
1558 intermediates.push_back(CertDuplicateCertificateContext(intermediate)); 1558 intermediates.push_back(CertDuplicateCertificateContext(intermediate));
1559 } 1559 }
1560 std::reverse(intermediates.begin(), intermediates.end()); 1560 std::reverse(intermediates.begin(), intermediates.end());
1561 1561
1562 scoped_refptr<X509Certificate> new_server_cert( 1562 scoped_refptr<X509Certificate> new_server_cert(
1563 X509Certificate::CreateFromHandle(server_cert_handle, intermediates)); 1563 X509Certificate::CreateFromHandle(server_cert_handle, intermediates));
1564 net_log_.AddEvent( 1564 net_log_.AddEvent(
1565 NetLog::TYPE_SSL_CERTIFICATES_RECEIVED, 1565 NetLog::TYPE_SSL_CERTIFICATES_RECEIVED,
1566 make_scoped_refptr(new X509CertificateNetLogParam(new_server_cert))); 1566 base::Bind(&NetLogX509CertificateCallback,
1567 base::Unretained(new_server_cert.get())));
1567 if (renegotiating_ && IsCertificateChainIdentical(server_cert_, 1568 if (renegotiating_ && IsCertificateChainIdentical(server_cert_,
1568 new_server_cert)) { 1569 new_server_cert)) {
1569 // We already verified the server certificate. Either it is good or the 1570 // We already verified the server certificate. Either it is good or the
1570 // user has accepted the certificate error. 1571 // user has accepted the certificate error.
1571 DidCompleteRenegotiation(); 1572 DidCompleteRenegotiation();
1572 } else { 1573 } else {
1573 server_cert_ = new_server_cert; 1574 server_cert_ = new_server_cert;
1574 next_state_ = STATE_VERIFY_CERT; 1575 next_state_ = STATE_VERIFY_CERT;
1575 } 1576 }
1576 CertFreeCertificateContext(server_cert_handle); 1577 CertFreeCertificateContext(server_cert_handle);
(...skipping 25 matching lines...) Expand all
1602 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA); 1603 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA);
1603 } 1604 }
1604 1605
1605 void SSLClientSocketWin::FreeSendBuffer() { 1606 void SSLClientSocketWin::FreeSendBuffer() {
1606 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer); 1607 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer);
1607 DCHECK(status == SEC_E_OK); 1608 DCHECK(status == SEC_E_OK);
1608 memset(&send_buffer_, 0, sizeof(send_buffer_)); 1609 memset(&send_buffer_, 0, sizeof(send_buffer_));
1609 } 1610 }
1610 1611
1611 } // namespace net 1612 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698