summaryrefslogtreecommitdiff
path: root/src/plop.hrl
blob: f142e46ace292a3a08e1e33b41b3e4dc2389a75e (plain)
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 = 0 :: 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' | integer(), % 'now' or uint64
          entry :: plop_entry()
         }).                   
-type plop_data() :: #plop_data{}.

-export_type([plop_entry/0, plop_data/0]).