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

Side by Side Diff: net/spdy/spdy_session.cc

Issue 1780983002: Provide valid port on HPKP reports for QUIC connections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Correct ordering of arguments in test Created 4 years, 9 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
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 <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 return false; 623 return false;
624 } 624 }
625 625
626 bool unused = false; 626 bool unused = false;
627 if (!ssl_info.cert->VerifyNameMatch(new_hostname, &unused)) 627 if (!ssl_info.cert->VerifyNameMatch(new_hostname, &unused))
628 return false; 628 return false;
629 629
630 std::string pinning_failure_log; 630 std::string pinning_failure_log;
631 // DISABLE_PIN_REPORTS is set here because this check can fail in 631 // DISABLE_PIN_REPORTS is set here because this check can fail in
632 // normal operation without being indicative of a misconfiguration or 632 // normal operation without being indicative of a misconfiguration or
633 // attack. 633 // attack. Port is left at 0 as it is never used.
634 //
635 // TODO(estark): replace 0 below with the port of the connection
636 // (though it won't actually be used since reports aren't getting
637 // sent).
638 if (!transport_security_state->CheckPublicKeyPins( 634 if (!transport_security_state->CheckPublicKeyPins(
639 HostPortPair(new_hostname, 0), ssl_info.is_issued_by_known_root, 635 HostPortPair(new_hostname, 0), ssl_info.is_issued_by_known_root,
640 ssl_info.public_key_hashes, ssl_info.unverified_cert.get(), 636 ssl_info.public_key_hashes, ssl_info.unverified_cert.get(),
641 ssl_info.cert.get(), TransportSecurityState::DISABLE_PIN_REPORTS, 637 ssl_info.cert.get(), TransportSecurityState::DISABLE_PIN_REPORTS,
642 &pinning_failure_log)) { 638 &pinning_failure_log)) {
643 return false; 639 return false;
644 } 640 }
645 641
646 return true; 642 return true;
647 } 643 }
(...skipping 2642 matching lines...) Expand 10 before | Expand all | Expand 10 after
3290 if (!queue->empty()) { 3286 if (!queue->empty()) {
3291 SpdyStreamId stream_id = queue->front(); 3287 SpdyStreamId stream_id = queue->front();
3292 queue->pop_front(); 3288 queue->pop_front();
3293 return stream_id; 3289 return stream_id;
3294 } 3290 }
3295 } 3291 }
3296 return 0; 3292 return 0;
3297 } 3293 }
3298 3294
3299 } // namespace net 3295 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/crypto_test_utils_chromium.cc ('k') | net/tools/quic/test_tools/quic_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698