From 11fc428f6eb52936bdbde1be5a6cd4e56704bc68 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 1 Mar 2017 09:37:30 +0100 Subject: Rename some variable and function names; add a NEWS entry. --- src/signing.erl | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/signing.erl') diff --git a/src/signing.erl b/src/signing.erl index 5bcd3eb..9cced1b 100644 --- a/src/signing.erl +++ b/src/signing.erl @@ -1,4 +1,4 @@ -%%% Copyright (c) 2014-2015, NORDUnet A/S. +%%% Copyright (c) 2014-2017, NORDUnet A/S. %%% See LICENSE for licensing information. %%% @doc Signing node API @@ -15,12 +15,7 @@ request(post, ?APPURL_PLOP_SIGNING, "sct", Input) -> html("sendentry: bad input:", E); {struct, PropList} -> Data = base64:decode(proplists:get_value(<<"data">>, PropList)), - Signatures = case proplists:get_value(<<"signatures">>, PropList) of - undefined -> - []; - Sigs -> - Sigs - end, + Signatures = proplists:get_value(<<"signatures">>, PropList, []), Result = sign:sign_sct(Data, Signatures), success({[{result, base64:encode(Result)}]}) end; @@ -30,7 +25,6 @@ request(post, ?APPURL_PLOP_SIGNING, "sth", Input) -> html("sendentry: bad input:", E); {struct, PropList} -> Data = base64:decode(proplists:get_value(<<"data">>, PropList)), - Result = sign:sign_sth(Data), success({[{result, base64:encode(Result)}]}) end. -- cgit v1.1