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

Add version guard to specs for OpenSSL::KDF.scrypt #1102

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

herwinw
Copy link
Member

@herwinw herwinw commented Oct 30, 2023

According to [1], this has been added in OpenSSL 3.0.

[1] https://www.openssl.org/docs/manmaster/man7/EVP_KDF-SCRYPT.html

This is a fix for an issue brought up in #1100.

@rhenium
Copy link
Member

rhenium commented Oct 30, 2023

[1] https://www.openssl.org/docs/manmaster/man7/EVP_KDF-SCRYPT.html

This is the manpage for EVP_KDF, an entirely new set of API added in OpenSSL 3.0. ruby/openssl currently doesn't use it.

OpenSSL::KDF.scrypt (via EVP_PBE_scrypt()) works with OpenSSL >= 1.1.0. Also, LibreSSL doesn't support scrypt at all, so I think the guard has to be something like

!OpenSSL::OPENSSL_VERSION.include?("LibreSSL") && OpenSSL::OPENSSL_VERSION_NUMBER >= 0x10100000

@eregon
Copy link
Member

eregon commented Oct 30, 2023

We don't test against LibreSSL at all so I'm not worried about that for now.

Could you update the guard to use OpenSSL >= 1.1.0 then?

@eregon eregon merged commit d56bd0f into ruby:master Oct 30, 2023
9 of 10 checks passed
@herwinw herwinw deleted the openssl_scrypt_version_guard branch October 30, 2023 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants