1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
% TODO: move to plop.hrl?
%% -record(spt, {
%% version :: integer(), % 8_bit_int
%% logid :: binary(), % 32_bit_binary() sha256 hash
%% signed_data :: signed_data()
%% }).
-define(PLOP_ENTRY_TYPE_X509, 0).
-define(PLOP_ENTRY_TYPE_PRECERT, 1).
-define(PLOP_ENTRY_TYPE_TEST, 2).
-record(plop_entry, {
type :: integer(), % uint16
entry :: binary()
}).
-type(plop_entry() :: #plop_entry{}).
-define(PLOP_SIGTYPE_CERTIFICATE_TIMESTAMP, 0).
-define(PLOP_SIGTYPE_TREE_HASH, 1).
-define(PLOP_SIGTYPE_TEST, 2).
-record(plop_data, {
version = 1 :: integer(), % uint8
signature_type :: integer(), % uint8
timestamp = now :: 'now' | binary(), % atom or uint64
entry :: plop_entry()
}).
-type plop_data() :: #plop_data{}.
-export_type([plop_entry/0, plop_data/0]).
|