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

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 103803012: Make HSTS headers not clobber preloaded pins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and refactor. (Not done yet.) Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: net/socket/ssl_client_socket_nss.cc
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index b3c8e0ee7b97bd2d3abdc6e6aa1aec33906cdcb8..5fd026a57030eb11ece1134933ba6256f94cbdba 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -3496,11 +3496,9 @@ int SSLClientSocketNSS::DoVerifyCertComplete(int result) {
ssl_config_.version_fallback;
const std::string& host = host_and_port_.host();
- TransportSecurityState::DomainState domain_state;
- if (transport_security_state_->GetDomainState(host, sni_available,
- &domain_state) &&
- domain_state.HasPublicKeyPins()) {
- if (!domain_state.CheckPublicKeyPins(
+ if (transport_security_state_->HasPublicKeyPins(host, sni_available)) {
+ if (!transport_security_state_->CheckPublicKeyPins(
Ryan Sleevi 2014/04/08 20:29:11 There's a potential of a perf hit here from having
+ host, sni_available,
server_cert_verify_result_.public_key_hashes)) {
result = ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN;
UMA_HISTOGRAM_BOOLEAN("Net.PublicKeyPinSuccess", false);

Powered by Google App Engine
This is Rietveld 408576698