summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2016-01-19 17:05:07 +0100
committerLinus Nordberg <linus@nordu.net>2016-01-19 17:05:07 +0100
commit3271c058fa61c22b604515cf8d2bdc61866d3a24 (patch)
tree4cbc3ab6d8cbdf7182700bc3d4174f05b0c6b9e1
parent2284984acf03ee8d5b9c748d0ac6377df9c08c30 (diff)
It's a string, not an integer.
-rw-r--r--src/compat.erl10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/compat.erl b/src/compat.erl
index bc3101d..bbb58a1 100644
--- a/src/compat.erl
+++ b/src/compat.erl
@@ -8,22 +8,20 @@ unpack_signature(Signature) ->
unpack_signature(erlang:system_info(otp_release), Signature).
%% @doc Dig out alg, params and key from issuer.
-unpack_issuer(17, Issuer) ->
+unpack_issuer("17", Issuer) ->
#'SubjectPublicKeyInfo'{
algorithm = #'AlgorithmIdentifier'{algorithm = Alg, parameters = Params},
subjectPublicKey = {0, Key}} = Issuer,
{Alg, Params, Key};
-unpack_issuer(18, Issuer) ->
+unpack_issuer("18", Issuer) ->
#'SubjectPublicKeyInfo'{
algorithm = #'AlgorithmIdentifier'{algorithm = Alg, parameters = Params},
subjectPublicKey = Key} = Issuer,
{Alg, Params, Key}.
%% @doc Unpack a #'Certificate'.signature, return the signature.
-unpack_signature(17, Signature) ->
+unpack_signature("17", Signature) ->
{_, Sig} = Signature,
Sig;
-unpack_signature(18, Signature) ->
+unpack_signature("18", Signature) ->
Signature.
-
-