From a77e6b4a9b30588f48fc5cf81bdf4982ef85ce7a Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Thu, 23 Oct 2014 11:12:37 +0200 Subject: Split CertChain properly. This way, Chain is always a list. --- src/x509.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x509.erl b/src/x509.erl index 42c6b89..8b1211d 100644 --- a/src/x509.erl +++ b/src/x509.erl @@ -16,7 +16,7 @@ normalise_chain(AcceptableRootCerts, CertChain) -> {false, Reason} -> {Reason, "invalid chain"}; {true, Root} -> - [Leaf, Chain] = CertChain, + [Leaf | Chain] = CertChain, {ok, [detox_precert(Leaf) | Chain] ++ Root} end. -- cgit v1.1