xref: /aosp_15_r20/external/cronet/net/tools/transport_security_state_generator/pinset.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2016 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "net/tools/transport_security_state_generator/pinset.h"
6 
7 namespace net::transport_security_state {
8 
Pinset(std::string name,std::string report_uri)9 Pinset::Pinset(std::string name, std::string report_uri)
10     : name_(name), report_uri_(report_uri) {}
11 
12 Pinset::~Pinset() = default;
13 
AddStaticSPKIHash(const std::string & hash_name)14 void Pinset::AddStaticSPKIHash(const std::string& hash_name) {
15   static_spki_hashes_.push_back(hash_name);
16 }
17 
AddBadStaticSPKIHash(const std::string & hash_name)18 void Pinset::AddBadStaticSPKIHash(const std::string& hash_name) {
19   bad_static_spki_hashes_.push_back(hash_name);
20 }
21 
22 }  // namespace net::transport_security_state
23