summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2014-10-21 17:16:50 +0200
committerLinus Nordberg <linus@nordberg.se>2014-10-24 11:03:30 +0200
commitc2415b2f3e337c072c4d5534d3f2b282d88d7230 (patch)
tree03e0b5d327dd30d300ded5ccbc582db939ec2625
parent92d8435250a9d8d498e129f91e64045bfd30e7b9 (diff)
Break include dependency on plop.hrl
-rw-r--r--README.md2
-rw-r--r--src/catlfish.erl1
-rw-r--r--src/v1.erl11
3 files changed, 5 insertions, 9 deletions
diff --git a/README.md b/README.md
index 21d86e5..ca13457 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ catlfish is a Certificate Transparency log server (RFC 6962).
# Compile
- $ CTROOT=.. make
+ $ make
$ make release
# Requirements
diff --git a/src/catlfish.erl b/src/catlfish.erl
index e261824..ae4da9d 100644
--- a/src/catlfish.erl
+++ b/src/catlfish.erl
@@ -3,7 +3,6 @@
-module(catlfish).
-export([add_chain/2, entries/2, entry_and_proof/2]).
--include("$CTROOT/plop/include/plop.hrl").
-define(PROTOCOL_VERSION, 0).
diff --git a/src/v1.erl b/src/v1.erl
index ba5c456..535fc8f 100644
--- a/src/v1.erl
+++ b/src/v1.erl
@@ -9,8 +9,6 @@
'get-sth-consistency'/3, 'get-proof-by-hash'/3, 'get-entries'/3,
'get-roots'/3, 'get-entry-and-proof'/3]).
--include("$CTROOT/plop/include/plop.hrl").
-
%% Public functions, i.e. part of URL.
'add-chain'(SessionID, _Env, Input) ->
R = case (catch jiffy:decode(Input)) of
@@ -34,11 +32,10 @@
niy(SessionID).
'get-sth'(SessionID, _Env, _Input) ->
- #sth{
- treesize = Treesize,
- timestamp = Timestamp,
- roothash = Roothash,
- signature = Signature} = plop:sth(),
+ { Treesize,
+ Timestamp,
+ Roothash,
+ Signature} = plop:sth(),
R = [{tree_size, Treesize},
{timestamp, Timestamp},
{sha256_root_hash, base64:encode(Roothash)},