Skip to content

Commit

Permalink
Add otpbp_public_key with cacerts_load/1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ledest committed Nov 12, 2023
1 parent f42b281 commit 619f7d9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions rebar.config.script
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ Funs = [{application, get_supervisor, 1},
{pubkey_ssh, new_openssh_decode, 1},
{pubkey_ssh, new_openssh_encode, 1},
{pubkey_ssh, pad, 2},
{public_key, cacerts_load, 1},
{queue, all, 2},
{queue, any, 2},
{queue, delete, 2},
Expand Down
1 change: 1 addition & 0 deletions src/otpbp_pt.erl
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
{{public_key, cacerts_clear, 0}, {pubkey_os_cacerts, clear}},
{{public_key, cacerts_get, 0}, {pubkey_os_cacerts, get}},
{{public_key, cacerts_load, 0}, {pubkey_os_cacerts, load}},
{{public_key, cacerts_load, 1}, otpbp_public_key},
{{public_key, ssh_decode, 2}, {ssh_file, decode}},
{{public_key, ssh_encode, 2}, {ssh_file, encode}},
{{public_key, ssh_hostkey_fingerprint, [1, 2]}, {ssh, hostkey_fingerprint}},
Expand Down
12 changes: 12 additions & 0 deletions src/otpbp_public_key.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-module(otpbp_public_key).

-compile({parse_transform, otpbp_pt}).

-ifndef(HAVE_public_key__cacerts_load_1).
% OTP 25.0
-export([cacerts_load/1]).
-endif.

-ifndef(HAVE_public_key__cacerts_load_1).
cacerts_load(File) -> pubkey_os_cacerts:load([File]).
-endif.

0 comments on commit 619f7d9

Please sign in to comment.