summaryrefslogtreecommitdiff
path: root/src/compat.erl
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2016-01-19 17:24:06 +0100
committerLinus Nordberg <linus@nordu.net>2016-01-19 17:24:06 +0100
commit9db20301d9db5b6759ec7da7922f3e917d1c50ef (patch)
treec0bc48752bae4c7f45a3d603091c15905dcab8f0 /src/compat.erl
parent3271c058fa61c22b604515cf8d2bdc61866d3a24 (diff)
Rename module compat -> catlfish_compat.CATLFISH-69
Can't have two modules with the same name in a release.
Diffstat (limited to 'src/compat.erl')
-rw-r--r--src/compat.erl27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/compat.erl b/src/compat.erl
deleted file mode 100644
index bbb58a1..0000000
--- a/src/compat.erl
+++ /dev/null
@@ -1,27 +0,0 @@
--module(compat).
--export([unpack_issuer/1, unpack_signature/1]).
--include_lib("public_key/include/public_key.hrl").
-
-unpack_issuer(Issuer) ->
- unpack_issuer(erlang:system_info(otp_release), Issuer).
-unpack_signature(Signature) ->
- unpack_signature(erlang:system_info(otp_release), Signature).
-
-%% @doc Dig out alg, params and key from issuer.
-unpack_issuer("17", Issuer) ->
- #'SubjectPublicKeyInfo'{
- algorithm = #'AlgorithmIdentifier'{algorithm = Alg, parameters = Params},
- subjectPublicKey = {0, Key}} = Issuer,
- {Alg, Params, Key};
-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) ->
- {_, Sig} = Signature,
- Sig;
-unpack_signature("18", Signature) ->
- Signature.