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

Side by Side Diff: net/test/ct_test_util.h

Issue 1576513002: Serialisation code for Certificate Transparency data (Closed) Base URL: ssh://caladan.lon.corp.google.com/usr/local/google/eranm/opensource_clients/chrome/src@sth_consistency_validation_2
Patch Set: Created 4 years, 11 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_CERT_CT_TEST_UTIL_H_ 5 #ifndef NET_CERT_CT_TEST_UTIL_H_
6 #define NET_CERT_CT_TEST_UTIL_H_ 6 #define NET_CERT_CT_TEST_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 // The SHA256 root hash for the sample STH. 71 // The SHA256 root hash for the sample STH.
72 std::string GetSampleSTHSHA256RootHash(); 72 std::string GetSampleSTHSHA256RootHash();
73 73
74 // The tree head signature for the sample STH. 74 // The tree head signature for the sample STH.
75 std::string GetSampleSTHTreeHeadSignature(); 75 std::string GetSampleSTHTreeHeadSignature();
76 76
77 // The same signature as GetSampleSTHTreeHeadSignature, decoded. 77 // The same signature as GetSampleSTHTreeHeadSignature, decoded.
78 void GetSampleSTHTreeHeadDecodedSignature(DigitallySigned* signature); 78 void GetSampleSTHTreeHeadDecodedSignature(DigitallySigned* signature);
79 79
80 // TODO(robpercival): The following two functions use the initialism "STH" but
81 // the rest of the functions use "SignedTreeHead".
82
83 // A sample, valid STH in SignedTreeHeadDataV1 format.
84 // See RFC 6962-bis for more information about this format.
85 std::string GetSampleSTH();
Eran Messeri 2016/01/14 12:46:45 Since it belongs to RFC6962-bis the function name
86
80 // The sample STH in JSON form. 87 // The sample STH in JSON form.
81 std::string GetSampleSTHAsJson(); 88 std::string GetSampleSTHAsJson();
82 89
83 // Assembles, and returns, a sample STH in JSON format using 90 // Assembles, and returns, a sample STH in JSON format using
84 // the provided parameters. 91 // the provided parameters.
85 std::string CreateSignedTreeHeadJsonString(size_t tree_size, 92 std::string CreateSignedTreeHeadJsonString(size_t tree_size,
86 int64_t timestamp, 93 int64_t timestamp,
87 std::string sha256_root_hash, 94 std::string sha256_root_hash,
88 std::string tree_head_signature); 95 std::string tree_head_signature);
89 96
90 // Assembles, and returns, a sample consistency proof in JSON format using 97 // Assembles, and returns, a sample consistency proof in JSON format using
91 // the provided raw nodes (i.e. the raw nodes will be base64-encoded). 98 // the provided raw nodes (i.e. the raw nodes will be base64-encoded).
92 std::string CreateConsistencyProofJsonString( 99 std::string CreateConsistencyProofJsonString(
93 const std::vector<std::string>& raw_nodes); 100 const std::vector<std::string>& raw_nodes);
94 } // namespace ct 101 } // namespace ct
95 102
96 } // namespace net 103 } // namespace net
97 104
98 #endif // NET_CERT_CT_TEST_UTIL_H_ 105 #endif // NET_CERT_CT_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698