From 0573cda1b335a9dfbcc33d5b61964dcaae2ed165 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Sun, 27 Mar 2016 19:27:30 +0200 Subject: WIP --- src/catlfish.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/catlfish.erl') diff --git a/src/catlfish.erl b/src/catlfish.erl index e3b5939..711deaa 100644 --- a/src/catlfish.erl +++ b/src/catlfish.erl @@ -286,7 +286,7 @@ entryhash_from_entry(PackedEntry) -> crypto:hash(sha256, [Cert | Chain]). %% Private functions. --spec pack_entry(normal|precert, binary(), binary(), [binary()]) -> binary(). +-spec pack_entry(normal|precert, binary(), binary(), [binary()]) -> list(). pack_entry(Type, MTLText, EndEntityCert, CertChain) -> [{<<"MTL1">>, MTLText}, {case Type of @@ -297,7 +297,7 @@ pack_entry(Type, MTLText, EndEntityCert, CertChain) -> list_to_binary( [tlv:encode(<<"X509">>, E) || E <- CertChain])}]. --spec unpack_entry(binary()) -> {normal|precert, binary(), binary(), [binary()]}. +-spec unpack_entry(list()) -> {normal|precert, binary(), binary(), [binary()]}. unpack_entry(Entry) -> [{<<"MTL1">>, MTLText}|Rest1] = Entry, [{EECType, EndEntityCert}|Rest2] = Rest1, -- cgit v1.1