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

Side by Side Diff: net/tools/transport_security_state_generator/input_file_parsers.h

Issue 2793823002: Add unittests for certificate and file parsing. (Closed)
Patch Set: Created 3 years, 8 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NET_TOOLS_TRANSPORT_SECURITY_STATE_INPUT_FILE_PARSERS_H_
6 #define NET_TOOLS_TRANSPORT_SECURITY_STATE_INPUT_FILE_PARSERS_H_
7
8 #include <string>
9
10 #include "net/tools/transport_security_state_generator/transport_security_state_ entry.h"
11
12 namespace net {
13
14 namespace transport_security_state {
15
16 class Pinsets;
17
18 // Extracts SPKI information from the preloaded pins file. The SPKI's can be
19 // in the form of a PEM certificate, a PEM public key, or a BASE64 string.
20 //
21 // More info on the format can be found in
22 // net/http/transport_security_state_static.pins
23 bool ParseCertificatesFile(const std::string& certs_input, Pinsets* pinsets);
davidben 2017/04/03 20:53:02 Doesn't really matter, but base::StringPiece is ba
martijnc 2017/04/04 18:31:10 Done.
24
25 // Parses the |json| string and copies the items under the "entries" key to
26 // |entries|, the pinsets under the "pinsets" key to |pinsets|, and the domain
27 // IDs under the "domain_ids" key to |domain_ids|.
28 //
29 // More info on the format can be found in
30 // net/http/transport_security_state_static.json
31 bool ParseJSON(const std::string& json,
davidben 2017/04/03 20:53:02 Ditto.
martijnc 2017/04/04 18:31:10 Done.
32 TransportSecurityStateEntries* entries,
33 Pinsets* pinsets,
34 DomainIDList* domain_ids);
35
36 } // namespace transport_security_state
37
38 } // namespace net
39
40 #endif // NET_TOOLS_TRANSPORT_SECURITY_STATE_INPUT_FILE_PARSERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698