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

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

Issue 7819009: For the SSL cert status, convert anonymous enum that gives bit values into a typedefed uint32. Th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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) 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/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 // Send the remaining bytes. 1150 // Send the remaining bytes.
1151 next_state_ = STATE_HANDSHAKE_WRITE; 1151 next_state_ = STATE_HANDSHAKE_WRITE;
1152 return OK; 1152 return OK;
1153 } 1153 }
1154 1154
1155 // Set server_cert_status_ and return OK or a network error. 1155 // Set server_cert_status_ and return OK or a network error.
1156 int SSLClientSocketWin::DoVerifyCert() { 1156 int SSLClientSocketWin::DoVerifyCert() {
1157 next_state_ = STATE_VERIFY_CERT_COMPLETE; 1157 next_state_ = STATE_VERIFY_CERT_COMPLETE;
1158 1158
1159 DCHECK(server_cert_); 1159 DCHECK(server_cert_);
1160 int cert_status; 1160 CertStatus cert_status;
1161 if (ssl_config_.IsAllowedBadCert(server_cert_, &cert_status)) { 1161 if (ssl_config_.IsAllowedBadCert(server_cert_, &cert_status)) {
1162 VLOG(1) << "Received an expected bad cert with status: " << cert_status; 1162 VLOG(1) << "Received an expected bad cert with status: " << cert_status;
1163 server_cert_verify_result_.Reset(); 1163 server_cert_verify_result_.Reset();
1164 server_cert_verify_result_.cert_status = cert_status; 1164 server_cert_verify_result_.cert_status = cert_status;
1165 server_cert_verify_result_.verified_cert = server_cert_; 1165 server_cert_verify_result_.verified_cert = server_cert_;
1166 return OK; 1166 return OK;
1167 } 1167 }
1168 1168
1169 int flags = 0; 1169 int flags = 0;
1170 if (ssl_config_.rev_checking_enabled) 1170 if (ssl_config_.rev_checking_enabled)
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA); 1551 UpdateConnectionTypeHistograms(CONNECTION_SSL_MD2_CA);
1552 } 1552 }
1553 1553
1554 void SSLClientSocketWin::FreeSendBuffer() { 1554 void SSLClientSocketWin::FreeSendBuffer() {
1555 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer); 1555 SECURITY_STATUS status = FreeContextBuffer(send_buffer_.pvBuffer);
1556 DCHECK(status == SEC_E_OK); 1556 DCHECK(status == SEC_E_OK);
1557 memset(&send_buffer_, 0, sizeof(send_buffer_)); 1557 memset(&send_buffer_, 0, sizeof(send_buffer_));
1558 } 1558 }
1559 1559
1560 } // namespace net 1560 } // namespace net
OLDNEW
« net/http/http_response_info.cc ('K') | « 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