From 845d3263c385e0241de19b48d7b6ae008b991091 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Sun, 4 Dec 2016 11:11:21 +0100 Subject: Add R16 compatibility. --- src/plop_compat.erl | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/plop_compat.erl') 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") -> -- cgit v1.1