1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-03 17:59:31 +02:00

Add workaround for Jose 1.11.10 not supporting OTP 28 ecPrivkeyVer1 (#4393)

This commit is contained in:
Badlop 2025-06-03 21:13:29 +02:00
parent 167bbc768a
commit 363351b18c

View file

@ -318,7 +318,11 @@ read_account_key() ->
case pkix:read_file(Path) of case pkix:read_file(Path) of
{ok, _, KeyMap} -> {ok, _, KeyMap} ->
case maps:keys(KeyMap) of case maps:keys(KeyMap) of
[#'ECPrivateKey'{} = Key|_] -> {ok, Key}; [#'ECPrivateKey'{version = ecPrivkeyVer1} = Key|_] ->
%% Erlang/OTP 28 generates this, but Jose doesn't support it
{ok, Key#'ECPrivateKey'{version = 1}};
[#'ECPrivateKey'{} = Key|_] ->
{ok, Key};
_ -> _ ->
?WARNING_MSG("File ~ts doesn't contain ACME account key. " ?WARNING_MSG("File ~ts doesn't contain ACME account key. "
"Trying to create a new one...", "Trying to create a new one...",