xref: /aosp_15_r20/external/cronet/net/cert/ct_log_response_parser.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright 2014 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 #ifndef NET_CERT_CT_LOG_RESPONSE_PARSER_H_
6 #define NET_CERT_CT_LOG_RESPONSE_PARSER_H_
7 
8 #include <string>
9 #include <vector>
10 
11 #include "net/base/net_export.h"
12 
13 namespace base {
14 class Value;
15 }  // namespace base
16 
17 namespace net::ct {
18 struct SignedTreeHead;
19 
20 // Fills in |signed_tree_head| from its JSON representation in
21 // |json_signed_tree_head|.
22 // Returns true and fills in |signed_tree_head| if all fields are present and
23 // valid.Otherwise, returns false and does not modify |signed_tree_head|.
24 NET_EXPORT bool FillSignedTreeHead(const base::Value& json_signed_tree_head,
25                                    SignedTreeHead* signed_tree_head);
26 
27 NET_EXPORT bool FillConsistencyProof(
28     const base::Value& json_signed_tree_head,
29     std::vector<std::string>* consistency_proof);
30 
31 }  // namespace net::ct
32 #endif  // NET_CERT_CT_LOG_RESPONSE_PARSER_H_
33