summaryrefslogtreecommitdiff
path: root/src/x509.erl
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2014-10-23 11:12:37 +0200
committerLinus Nordberg <linus@nordberg.se>2014-10-23 14:19:35 +0200
commita77e6b4a9b30588f48fc5cf81bdf4982ef85ce7a (patch)
tree5f5800c9b34d0b635c8ca8d2fc2f691999c5e7c2 /src/x509.erl
parent958fecc4ff012960fd98419ab99da0d131f0d0f7 (diff)
Split CertChain properly.
This way, Chain is always a list.
Diffstat (limited to 'src/x509.erl')
-rw-r--r--src/x509.erl2
1 files changed, 1 insertions, 1 deletions
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.