diff options
Diffstat (limited to 'src/signing.erl')
-rw-r--r-- | src/signing.erl | 10 |
1 files changed, 2 insertions, 8 deletions
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. |