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

Side by Side Diff: net/cert/merkle_tree_leaf.h

Issue 1945183005: Adds function for generating MerkleTreeLeaf hash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ct_merkle_tree_leaf_encode
Patch Set: Rebase Created 4 years, 7 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
« no previous file with comments | « no previous file | net/cert/merkle_tree_leaf.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_MERKLE_TREE_LEAF_H_ 5 #ifndef NET_CERT_MERKLE_TREE_LEAF_H_
6 #define NET_CERT_MERKLE_TREE_LEAF_H_ 6 #define NET_CERT_MERKLE_TREE_LEAF_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 24 matching lines...) Expand all
35 base::Time timestamp; 35 base::Time timestamp;
36 36
37 // Extensions from the SCT. 37 // Extensions from the SCT.
38 std::string extensions; 38 std::string extensions;
39 }; 39 };
40 40
41 NET_EXPORT bool GetMerkleTreeLeaf(const X509Certificate* cert, 41 NET_EXPORT bool GetMerkleTreeLeaf(const X509Certificate* cert,
42 const SignedCertificateTimestamp* sct, 42 const SignedCertificateTimestamp* sct,
43 MerkleTreeLeaf* merkle_tree_leaf); 43 MerkleTreeLeaf* merkle_tree_leaf);
44 44
45 // Sets |*out| to the hash of the Merkle |tree_leaf|, as defined in RFC6962.
46 // Returns true if the hash was generated, false if an error occurred.
47 NET_EXPORT bool Hash(const MerkleTreeLeaf& tree_leaf, std::string* out);
48
45 } // namespace ct 49 } // namespace ct
46 50
47 } // namespace net 51 } // namespace net
48 52
49 #endif // NET_CERT_MERKLE_TREE_LEAF_H_ 53 #endif // NET_CERT_MERKLE_TREE_LEAF_H_
OLDNEW
« no previous file with comments | « no previous file | net/cert/merkle_tree_leaf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698