Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

public_key deprecations in OTP 27.0 #168

Closed
maennchen opened this issue May 14, 2024 · 6 comments
Closed

public_key deprecations in OTP 27.0 #168

maennchen opened this issue May 14, 2024 · 6 comments

Comments

@maennchen
Copy link
Contributor

===> Compiling jose
===> Compiling _build/default/lib/jose/src/jwa/jose_jwa.erl failed
_build/default/lib/jose/src/jwa/jose_jwa.erl:120:2: public_key:decrypt_private/3 is deprecated; do not use
_build/default/lib/jose/src/jwa/jose_jwa.erl:127:2: public_key:encrypt_public/3 is deprecated; do not use

See: https://github.com/erlef/oidcc_cowboy/actions/runs/9034558041/job/24963222738?pr=33

@maennchen maennchen changed the title public_key deprecations in OTP master public_key deprecations in OTP 27.0 May 24, 2024
@maennchen
Copy link
Contributor Author

maennchen commented May 24, 2024

I went to check It seems like the functions were deprecated without a replacement:

https://github.com/erlang/otp/blob/79bc8234396a4f619f40dadfb8458064ab29aa85/lib/public_key/src/public_key.erl#L116-L119

Commit: erlang/otp@1e8d904#diff-be09f175079f98e5baaee4302d27de2632a80105c41430ed6352e785d27f62f4

The docs quote security reasons:
https://www.erlang.org/doc/apps/crypto/crypto.html#public_encrypt/4

This is a legacy function, for security reasons do not use.

@Neustradamus
Copy link

@badlop: Do you know this problem?

@Ri0n has tried to install an ejabberd :/

@maennchen
Copy link
Contributor Author

Current state of discussions about the depreciation: https://erlangforums.com/t/security-working-group-minutes/3451/6?u=maennchen

@badlop
Copy link
Contributor

badlop commented Jun 4, 2024

Considering that the compilation warning will remain there, and there is no alternative, and Jose really requires that feature, I guess it makes sense to disable warnings_as_errors in

warnings_as_errors

@maennchen
Copy link
Contributor Author

Erlang Workaround for now:

rebar.config:

{overrides, [
    {override, jose, [{erl_opts, []}]}
]}.

@maennchen
Copy link
Contributor Author

Will be undeprecated in OTP 27.1: erlang/otp#8700

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants