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