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

Side by Side Diff: net/http/transport_security_state.cc

Issue 1212613004: Build and send HPKP violation reports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: combine GetHPKPReportUri() and BuildHPKPReport() into GetHPKPReport() 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
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/http/transport_security_state.h" 5 #include "net/http/transport_security_state.h"
6 6
7 #if defined(USE_OPENSSL) 7 #if defined(USE_OPENSSL)
8 #include <openssl/ecdsa.h> 8 #include <openssl/ecdsa.h>
9 #include <openssl/ssl.h> 9 #include <openssl/ssl.h>
10 #else // !defined(USE_OPENSSL) 10 #else // !defined(USE_OPENSSL)
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 548
549 return false; 549 return false;
550 } 550 }
551 551
552 void TransportSecurityState::SetDelegate( 552 void TransportSecurityState::SetDelegate(
553 TransportSecurityState::Delegate* delegate) { 553 TransportSecurityState::Delegate* delegate) {
554 DCHECK(CalledOnValidThread()); 554 DCHECK(CalledOnValidThread());
555 delegate_ = delegate; 555 delegate_ = delegate;
556 } 556 }
557 557
558 void TransportSecurityState::SetReporter(
559 TransportSecurityState::Reporter* reporter) {
560 DCHECK(CalledOnValidThread());
561 reporter_ = reporter;
562 }
563
558 void TransportSecurityState::AddHSTSInternal( 564 void TransportSecurityState::AddHSTSInternal(
559 const std::string& host, 565 const std::string& host,
560 TransportSecurityState::STSState::UpgradeMode upgrade_mode, 566 TransportSecurityState::STSState::UpgradeMode upgrade_mode,
561 const base::Time& expiry, 567 const base::Time& expiry,
562 bool include_subdomains) { 568 bool include_subdomains) {
563 DCHECK(CalledOnValidThread()); 569 DCHECK(CalledOnValidThread());
564 570
565 STSState sts_state; 571 STSState sts_state;
566 sts_state.last_observed = base::Time::Now(); 572 sts_state.last_observed = base::Time::Now();
567 sts_state.include_subdomains = include_subdomains; 573 sts_state.include_subdomains = include_subdomains;
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 TransportSecurityState::PKPStateIterator::PKPStateIterator( 1062 TransportSecurityState::PKPStateIterator::PKPStateIterator(
1057 const TransportSecurityState& state) 1063 const TransportSecurityState& state)
1058 : iterator_(state.enabled_pkp_hosts_.begin()), 1064 : iterator_(state.enabled_pkp_hosts_.begin()),
1059 end_(state.enabled_pkp_hosts_.end()) { 1065 end_(state.enabled_pkp_hosts_.end()) {
1060 } 1066 }
1061 1067
1062 TransportSecurityState::PKPStateIterator::~PKPStateIterator() { 1068 TransportSecurityState::PKPStateIterator::~PKPStateIterator() {
1063 } 1069 }
1064 1070
1065 } // namespace 1071 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698