summaryrefslogtreecommitdiff
path: root/src/plop_compat.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/plop_compat.erl')
-rw-r--r--src/plop_compat.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plop_compat.erl b/src/plop_compat.erl
index d59edf0..7466cbc 100644
--- a/src/plop_compat.erl
+++ b/src/plop_compat.erl
@@ -8,6 +8,10 @@ timestamp() ->
timestamp(erlang:system_info(otp_release)).
+unpack_spki("R16" ++ _, SPKI) ->
+ #'SubjectPublicKeyInfo'{subjectPublicKey = {_, Octets},
+ algorithm = Algorithm} = SPKI,
+ {Octets, Algorithm};
unpack_spki("17", SPKI) ->
#'SubjectPublicKeyInfo'{subjectPublicKey = {_, Octets},
algorithm = Algorithm} = SPKI,
@@ -18,6 +22,8 @@ unpack_spki("18", SPKI) ->
{Octets, Algorithm}.
%% <=R17: now/0, >=R18 timestamp/0
+timestamp("R16" ++ _) ->
+ erlang:now();
timestamp("17") ->
erlang:now();
timestamp("18") ->