Skip to content

ext/openssl: Add option to load legacy algorithm provider #13951

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

Closed
wants to merge 1 commit into from

Conversation

adsr
Copy link
Contributor

@adsr adsr commented Apr 12, 2024

OpenSSL 3.x relegated a set of insecure algorithms to a "legacy" provider which is not loaded by default. Some of these algorithms have utility beyond encryption such as for hashing, e.g., DES[1]

Add a compile-time option to load the legacy provider in 3.x. When enabled, also load the default provider because loading any provider explicitly disables auto-loading the default provider.

Node.js has a similar option[2].

[1] https://github.com/vitessio/vitess/blob/9e40015748ede158357bd7291f583db138abc3df/go/vt/vtgate/vindexes/hash.go#L157

[2] https://github.com/nodejs/node/blob/1091efc2ab4e960e010d4d2094ae8d5d8d70f1d3/src/node_options.cc#L1043

OpenSSL 3.x relegated a set of insecure algorithms to a "legacy"
provider which is not loaded by default. Some of these algorithms
have utility beyond encryption such as for hashing, e.g., DES[1]

Add a compile-time option to load the legacy provider in 3.x. When
enabled, also load the default provider because loading any provider
explicitly disables auto-loading the default provider.

[1] https://github.com/vitessio/vitess/blob/9e40015748ede158357bd7291f583db138abc3df/go/vt/vtgate/vindexes/hash.go#L157
Copy link
Member

@rlerdorf rlerdorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Tested on debian-testing

Copy link
Member

@bukka bukka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bukka bukka closed this in 956c3c2 Apr 28, 2024
@petk
Copy link
Member

petk commented Apr 28, 2024

Missing:

@petk
Copy link
Member

petk commented Apr 28, 2024

Another thing I've just noticed. Should this be made available also on Windows builds?

petk added a commit that referenced this pull request Jul 13, 2024
Added here to have all build system configuration options changes also
at one place for easier overview.

Option added via GH-13951
@cmb69
Copy link
Member

cmb69 commented Nov 14, 2024

Should this be made available also on Windows builds?

We may have talked about elsewhere already, but anyway, I don't think it makes much sense to have that on Windows (very few do custom build there), and to my knowledge it is not even needed. Our OpenSSL packages ship legacy.dll which can be loaded via openssl.conf (see #9890).

PS: #15747 ¯\(ツ)

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

Successfully merging this pull request may close these issues.

5 participants