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_openssl.cc

Issue 1211933005: Initial (partial) implementation of HPKP violation reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: style fixes, comments Created 5 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
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/spdy/spdy_session.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 // 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 <errno.h> 10 #include <errno.h>
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 } 1153 }
1154 } 1154 }
1155 1155
1156 const CertStatus cert_status = server_cert_verify_result_.cert_status; 1156 const CertStatus cert_status = server_cert_verify_result_.cert_status;
1157 if (transport_security_state_ && 1157 if (transport_security_state_ &&
1158 (result == OK || 1158 (result == OK ||
1159 (IsCertificateError(result) && IsCertStatusMinorError(cert_status))) && 1159 (IsCertificateError(result) && IsCertStatusMinorError(cert_status))) &&
1160 !transport_security_state_->CheckPublicKeyPins( 1160 !transport_security_state_->CheckPublicKeyPins(
1161 host_and_port_.host(), 1161 host_and_port_.host(),
1162 server_cert_verify_result_.is_issued_by_known_root, 1162 server_cert_verify_result_.is_issued_by_known_root,
1163 server_cert_verify_result_.public_key_hashes, 1163 server_cert_verify_result_.public_key_hashes, host_and_port_.port(),
1164 server_cert_, server_cert_verify_result_.verified_cert,
1165 TransportSecurityState::SEND_PUBLIC_KEY_PIN_REPORT,
1164 &pinning_failure_log_)) { 1166 &pinning_failure_log_)) {
1165 result = ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN; 1167 result = ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN;
1166 } 1168 }
1167 1169
1168 if (result == OK) { 1170 if (result == OK) {
1169 // Only check Certificate Transparency if there were no other errors with 1171 // Only check Certificate Transparency if there were no other errors with
1170 // the connection. 1172 // the connection.
1171 VerifyCT(); 1173 VerifyCT();
1172 1174
1173 DCHECK(!certificate_verified_); 1175 DCHECK(!certificate_verified_);
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 1927
1926 NextProto next_proto = NextProtoFromString(npn_proto_); 1928 NextProto next_proto = NextProtoFromString(npn_proto_);
1927 for (NextProto allowed : ssl_config_.renego_allowed_for_protos) { 1929 for (NextProto allowed : ssl_config_.renego_allowed_for_protos) {
1928 if (next_proto == allowed) 1930 if (next_proto == allowed)
1929 return true; 1931 return true;
1930 } 1932 }
1931 return false; 1933 return false;
1932 } 1934 }
1933 1935
1934 } // namespace net 1936 } // namespace net
OLDNEW
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698