diff options
author | Linus Nordberg <linus@nordu.net> | 2016-01-19 17:05:07 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2016-08-18 14:46:26 +0200 |
commit | 0124ba48d6751b1d5cb4e8a26945562f4d1b05f3 (patch) | |
tree | 3ca045f11991b27eaeece7d139c688eb14cd8ec7 /src/compat.erl | |
parent | 748d1d453480df3108d1465b8c4b8893ca97c52b (diff) |
It's a string, not an integer.
Diffstat (limited to 'src/compat.erl')
-rw-r--r-- | src/compat.erl | 10 |
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. - - |