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

Side by Side Diff: net/spdy/spdy_session.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, 5 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_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) 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/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 ChannelIDService::GetDomainForHost(new_hostname) != 591 ChannelIDService::GetDomainForHost(new_hostname) !=
592 ChannelIDService::GetDomainForHost(old_hostname)) { 592 ChannelIDService::GetDomainForHost(old_hostname)) {
593 return false; 593 return false;
594 } 594 }
595 595
596 bool unused = false; 596 bool unused = false;
597 if (!ssl_info.cert->VerifyNameMatch(new_hostname, &unused)) 597 if (!ssl_info.cert->VerifyNameMatch(new_hostname, &unused))
598 return false; 598 return false;
599 599
600 std::string pinning_failure_log; 600 std::string pinning_failure_log;
601 // TODO(estark): replace 0 below with the port of the connection
602 // (though it won't actually be used since reports aren't getting
603 // sent).
601 if (!transport_security_state->CheckPublicKeyPins( 604 if (!transport_security_state->CheckPublicKeyPins(
602 new_hostname, 605 new_hostname, ssl_info.is_issued_by_known_root,
603 ssl_info.is_issued_by_known_root, 606 ssl_info.public_key_hashes, 0, ssl_info.unverified_cert,
604 ssl_info.public_key_hashes, 607 ssl_info.cert,
608 TransportSecurityState::DO_NOT_SEND_PUBLIC_KEY_PIN_REPORT,
605 &pinning_failure_log)) { 609 &pinning_failure_log)) {
606 return false; 610 return false;
607 } 611 }
608 612
609 return true; 613 return true;
610 } 614 }
611 615
612 SpdySession::SpdySession( 616 SpdySession::SpdySession(
613 const SpdySessionKey& spdy_session_key, 617 const SpdySessionKey& spdy_session_key,
614 const base::WeakPtr<HttpServerProperties>& http_server_properties, 618 const base::WeakPtr<HttpServerProperties>& http_server_properties,
(...skipping 2641 matching lines...) Expand 10 before | Expand all | Expand 10 after
3256 if (!queue->empty()) { 3260 if (!queue->empty()) {
3257 SpdyStreamId stream_id = queue->front(); 3261 SpdyStreamId stream_id = queue->front();
3258 queue->pop_front(); 3262 queue->pop_front();
3259 return stream_id; 3263 return stream_id;
3260 } 3264 }
3261 } 3265 }
3262 return 0; 3266 return 0;
3263 } 3267 }
3264 3268
3265 } // namespace net 3269 } // 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