diff options
Diffstat (limited to 'include/plop.hrl')
-rw-r--r-- | include/plop.hrl | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/include/plop.hrl b/include/plop.hrl index 0f687d0..354a0f2 100644 --- a/include/plop.hrl +++ b/include/plop.hrl @@ -20,7 +20,7 @@ version :: pos_integer(), % uint8 logid :: binary(), % SHA-256 over DER encoded public log key timestamp :: integer(), % uint64 - signature :: binary() + signature :: signature() }). -type spt() :: #spt{}. @@ -44,8 +44,25 @@ treesize :: integer(), timestamp :: integer(), roothash :: binary(), - signature :: binary() + signature :: signature() }). -type sth() :: #sth{}. +%% RFC 5246 7.4.1.4.1 +-type hash_alg_type() :: none | md5 | sha1 | sha224 | sha256 | sha384 | + sha512. % uint8 +-type signature_alg_type() :: anonymous | rsa | dsa | ecdsa. % uint8 +-record(sig_and_hash_alg, { + hash_alg :: hash_alg_type(), + signature_alg :: signature_alg_type() + }). +-type sig_and_hash_alg() :: #sig_and_hash_alg{}. + +%% RFC 5246 4.7 +-record(signature, { + algorithm :: sig_and_hash_alg(), + signature :: binary() + }). +-type signature() :: #signature{}. + -export_type([timestamped_entry/0, mtl/0, entry_type/0]). |