From 9f3fce20f1f3e07b11163a4d7f6a6596fffa7705 Mon Sep 17 00:00:00 2001 From: Magnus Ahltorp Date: Wed, 8 Feb 2017 15:38:52 +0100 Subject: Support for Erlang/OTP 19 --- src/catlfish_compat.erl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/catlfish_compat.erl b/src/catlfish_compat.erl index adf4a1a..a0ccdc2 100644 --- a/src/catlfish_compat.erl +++ b/src/catlfish_compat.erl @@ -27,6 +27,11 @@ unpack_issuer("18", Issuer) -> #'SubjectPublicKeyInfo'{ algorithm = #'AlgorithmIdentifier'{algorithm = Alg, parameters = Params}, subjectPublicKey = Key} = Issuer, + {Alg, Params, Key}; +unpack_issuer("19", Issuer) -> + #'SubjectPublicKeyInfo'{ + algorithm = #'AlgorithmIdentifier'{algorithm = Alg, parameters = Params}, + subjectPublicKey = Key} = Issuer, {Alg, Params, Key}. %% @doc Unpack a #'Certificate'.signature, return the signature. @@ -37,6 +42,8 @@ unpack_signature("17", Signature) -> {_, Sig} = Signature, Sig; unpack_signature("18", Signature) -> + Signature; +unpack_signature("19", Signature) -> Signature. %% Use a list for R17 and a binary for newer versions. @@ -45,4 +52,6 @@ poison_val("R16" ++ _, Val) -> poison_val("17", Val) -> Val; poison_val("18", Val) -> + list_to_binary(Val); +poison_val("19", Val) -> list_to_binary(Val). -- cgit v1.1