| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |