diff options
author | Linus Nordberg <linus@nordu.net> | 2014-04-25 12:21:38 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2014-04-25 12:21:38 +0200 |
commit | 80ae7bd6d3e139078ee58d9861f159b555d28b38 (patch) | |
tree | 96646e9643bc23944b3aee855becd73b4b3f4256 /src/plop.hrl | |
parent | fad037a338a48a4e83b33860663632a774aff522 (diff) |
Produce SPT's, add tests.
NOTE: Test vectors not verified.
Diffstat (limited to 'src/plop.hrl')
-rw-r--r-- | src/plop.hrl | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/plop.hrl b/src/plop.hrl new file mode 100644 index 0000000..a4f2bb6 --- /dev/null +++ b/src/plop.hrl @@ -0,0 +1,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]). |