From 74fa8bfa586da34eb2c9be14d39d10f5cac1955b Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Mon, 12 May 2014 14:54:54 +0200 Subject: Signatures must now be serialised and base64 encoded. --- src/v1.erl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/v1.erl b/src/v1.erl index b082d5b..3d0c1e3 100644 --- a/src/v1.erl +++ b/src/v1.erl @@ -18,7 +18,9 @@ add_chain(SessionID, _Env, Input) -> {id, base64:encode(SPT#spt.logid)}, {timestamp, SPT#spt.timestamp}, {extensions, []}, - {signature, base64:encode(SPT#spt.signature)}], + {signature, + base64:encode( + list_to_binary(plop:serialise(SPT#spt.signature)))}], binary_to_list(jiffy:encode({R})); _ -> html("add-chain: missing input: chain; see RFC 6962", Input) end, @@ -36,7 +38,8 @@ get_sth(SessionID, _Env, _Input) -> R = [{tree_size, Treesize}, {timestamp, Timestamp}, {sha256_root_hash, base64:encode(Roothash)}, - {tree_head_signature, Signature}], + {tree_head_signature, base64:encode( + list_to_binary(plop:serialise(Signature)))}], mod_esi:deliver(SessionID, binary_to_list(jiffy:encode({R}))). get_sth_consistency(SessionID, _Env, _Input) -> -- cgit v1.1