Parse the leaf header
(leaf)
| 254 | |
| 255 | |
| 256 | def read_leaf_header(leaf): |
| 257 | """ |
| 258 | Parse the leaf header |
| 259 | """ |
| 260 | header = {} |
| 261 | header["version"] = int(leaf[0]) |
| 262 | header["merkle_leaf_type"] = int(leaf[1]) |
| 263 | header["timestamp"] = int.from_bytes(leaf[2:10], "big") |
| 264 | header["LogEntryType"] = int.from_bytes(leaf[10:12], "big") |
| 265 | header["Entry"] = leaf[12:] |
| 266 | return header |
| 267 | |
| 268 | |
| 269 | def get_cert_from_leaf(logger, leaf): |
no outgoing calls
no test coverage detected