session: exclude hosts from CT verification if they are handled by custom cert verifiers
This commit is contained in:
parent
3dd8377218
commit
5cbbd6efe6
7 changed files with 101 additions and 11 deletions
33
atom/browser/net/atom_ct_delegate.h
Normal file
33
atom/browser/net/atom_ct_delegate.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
// Copyright (c) 2016 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ATOM_BROWSER_NET_ATOM_CT_DELEGATE_H_
|
||||
#define ATOM_BROWSER_NET_ATOM_CT_DELEGATE_H_
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
||||
#include "net/http/transport_security_state.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
class AtomCTDelegate : public net::TransportSecurityState::RequireCTDelegate {
|
||||
public:
|
||||
AtomCTDelegate();
|
||||
~AtomCTDelegate() override;
|
||||
|
||||
void AddCTExcludedHost(const std::string& host);
|
||||
void ClearCTExcludedHostsList();
|
||||
|
||||
// net::TransportSecurityState::RequireCTDelegate:
|
||||
CTRequirementLevel IsCTRequiredForHost(const std::string& host) override;
|
||||
|
||||
private:
|
||||
std::set<std::string> ct_excluded_hosts_;
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomCTDelegate);
|
||||
};
|
||||
|
||||
} // namespace atom
|
||||
|
||||
#endif // ATOM_BROWSER_NET_ATOM_CT_DELEGATE_H_
|
Loading…
Add table
Add a link
Reference in a new issue