diff options
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. - - |