summaryrefslogtreecommitdiff
path: root/src/plop.erl
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2014-05-19 16:24:38 +0200
committerLinus Nordberg <linus@nordberg.se>2014-05-19 16:24:38 +0200
commit7062a5789410e34a4ca4d16786a4f46983acf893 (patch)
treed694564ba7e8ec16ee92134cbb352c20789e3527 /src/plop.erl
parent0d952b63b62539523c2f138074ed5329018b454a (diff)
Change default protocol version from 1 to 0.
RFC6962 "v1" is 0, not 1. Also, use a define and not a literal. Also also, move the define to plop.hrl.
Diffstat (limited to 'src/plop.erl')
-rw-r--r--src/plop.erl6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plop.erl b/src/plop.erl
index eb16aa8..d7d25ba 100644
--- a/src/plop.erl
+++ b/src/plop.erl
@@ -27,7 +27,6 @@
-include_lib("public_key/include/public_key.hrl").
-include_lib("eunit/include/eunit.hrl").
--define(PLOPVERSION, 1).
-define(TESTPRIVKEYFILE, "test/eckey.pem").
-define(TESTPUBKEYFILE, "test/eckey-public.pem").
@@ -39,7 +38,7 @@
%% @doc The parts of an STH which is to be signed. Used as the
%% interface to plop:sth/1, for testing.
-record(sth_signed, {
- version = 1 :: pos_integer(),
+ version = ?PLOPVERSION :: pos_integer(),
signature_type :: signature_type(),
timestamp = now :: 'now' | integer(),
tree_size :: integer(),
@@ -50,7 +49,7 @@
%% @doc What's signed in an SPT. Used for serialisation before hasning
%% and signing. FIXME: Overlapping #spt{} -- merge somehow?
-record(spt_signed, {
- version :: pos_integer(),
+ version = ?PLOPVERSION :: pos_integer(),
signature_type :: signature_type(),
timestamp :: integer(),
entry_type :: entry_type(),
@@ -180,7 +179,6 @@ spt(LogID, PrivKey, #timestamped_entry{
}) ->
BinToSign =
list_to_binary(serialise(#spt_signed{
- version = 1,
signature_type = certificate_timestamp,
timestamp = Timestamp,
entry_type = EntryType,