diff options
author | Linus Nordberg <linus@nordu.net> | 2016-12-04 11:11:21 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2016-12-04 11:11:21 +0100 |
commit | 845d3263c385e0241de19b48d7b6ae008b991091 (patch) | |
tree | de15f745b615ca1ff1d0bf4c03c81bfc20cbed83 /src/plop_compat.erl | |
parent | 633b367b0c9e219a81b692223981a9329b5825f9 (diff) |
Add R16 compatibility.
Diffstat (limited to 'src/plop_compat.erl')
-rw-r--r-- | src/plop_compat.erl | 6 |
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") -> |