diff options
-rw-r--r-- | AUTHORS | 4 | ||||
-rw-r--r-- | Emakefile | 3 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | ebin/catlfish.app | 2 | ||||
-rw-r--r-- | reltool.config | 2 | ||||
-rw-r--r-- | src/catlfish.erl | 1 | ||||
-rw-r--r-- | src/catlfish_app.erl | 3 | ||||
-rw-r--r-- | src/v1.erl | 11 | ||||
-rw-r--r-- | tools/certtools.py | 3 | ||||
-rwxr-xr-x | tools/submitcert.py | 4 | ||||
-rwxr-xr-x | tools/testcase1.py | 4 |
12 files changed, 30 insertions, 12 deletions
@@ -0,0 +1,4 @@ +Catlfish was written by, in alphabetic order: + +Linus Nordberg, NORDUnet +Magnus Ahltorp, KTH Royal Institute of Technology @@ -2,4 +2,5 @@ {["src/*", "test/*"], [debug_info, {i, "include/"}, - {outdir, "ebin/"}]}. + {outdir, "ebin/"}, + {parse_transform, lager_transform}]}. @@ -1,5 +1,5 @@ build all: - erl -make + erl -pa ../lager/ebin -make clean: -rm ebin/*.beam release: @@ -4,7 +4,7 @@ catlfish is a Certificate Transparency log server (RFC 6962). # Compile - $ CTROOT=.. make + $ make $ make release # Requirements @@ -12,6 +12,7 @@ catlfish is a Certificate Transparency log server (RFC 6962). A compiled plop application in ../plop A compiled https://github.com/davisp/jiffy (for JSON encoding and decoding) in ../jiffy +A compiled https://github.com/basho/lager (for logging) in ../lager # Start diff --git a/ebin/catlfish.app b/ebin/catlfish.app index 8cbe5f7..44c9e0f 100644 --- a/ebin/catlfish.app +++ b/ebin/catlfish.app @@ -8,5 +8,5 @@ [{description, "catlfish -- Certificate Transparency Log Server"}, {vsn, "0.2.0-dev"}, {modules, [v1, catlfish_app]}, - {applications, [kernel, stdlib, plop, inets, jiffy]}, + {applications, [kernel, stdlib, plop, inets, jiffy, lager]}, {mod, {catlfish_app, []}}]}. diff --git a/reltool.config b/reltool.config index 80b374d..6f9d52a 100644 --- a/reltool.config +++ b/reltool.config @@ -13,5 +13,7 @@ {excl_archive_filters, ["^include$","^priv$","^\\.git$"]}, {app, catlfish, [{app_file, all}, {lib_dir, "."}]}, {app, plop, [{app_file, all}, {lib_dir, "../plop"}]}, + {app, lager, [{app_file, all}, {lib_dir, "../lager"}]}, + {app, goldrush, [{app_file, all}, {lib_dir, "../lager/deps/goldrush"}]}, {app, jiffy, [{app_file, all}, {lib_dir, "../jiffy"}]} ]}. diff --git a/src/catlfish.erl b/src/catlfish.erl index cd871f5..73066bb 100644 --- a/src/catlfish.erl +++ b/src/catlfish.erl @@ -4,7 +4,6 @@ -module(catlfish). -export([add_chain/2, entries/2, entry_and_proof/2]). -export([known_roots/0, update_known_roots/0]). --include("$CTROOT/plop/include/plop.hrl"). -include_lib("eunit/include/eunit.hrl"). -define(PROTOCOL_VERSION, 0). diff --git a/src/catlfish_app.erl b/src/catlfish_app.erl index 7e26243..39c3109 100644 --- a/src/catlfish_app.erl +++ b/src/catlfish_app.erl @@ -1,3 +1,6 @@ +%%% Copyright (c) 2014, NORDUnet A/S. +%%% See LICENSE for licensing information. + -module(catlfish_app). -behaviour(application). @@ -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 @@ -44,11 +42,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)}, diff --git a/tools/certtools.py b/tools/certtools.py index a62d58f..8d64ee4 100644 --- a/tools/certtools.py +++ b/tools/certtools.py @@ -1,3 +1,6 @@ +# Copyright (c) 2014, NORDUnet A/S. +# See LICENSE for licensing information. + import subprocess import json import base64 diff --git a/tools/submitcert.py b/tools/submitcert.py index 1fa6982..4f1609c 100755 --- a/tools/submitcert.py +++ b/tools/submitcert.py @@ -1,4 +1,8 @@ #!/usr/bin/env python + +# Copyright (c) 2014, NORDUnet A/S. +# See LICENSE for licensing information. + import urllib2 import urllib import json diff --git a/tools/testcase1.py b/tools/testcase1.py index f78faa3..eab6c6f 100755 --- a/tools/testcase1.py +++ b/tools/testcase1.py @@ -1,4 +1,8 @@ #!/usr/bin/env python + +# Copyright (c) 2014, NORDUnet A/S. +# See LICENSE for licensing information. + import urllib2 import urllib import json |