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

[3.10] gh-118224: Load default OpenSSL provider for nonsecurity algorithms (GH-118236) #118240

Closed
wants to merge 2 commits into from

Conversation

xnox
Copy link

@xnox xnox commented Apr 24, 2024

When OpenSSL is configured to only load "base+fips" providers into the Null library context, md5 might not be available at all. In such cases currently CPython fallsback to internal hashlib implementation is there is one - as there might not be if one compiles python with --with-builtin-hashlib-hashes=blake2. With this change "default" provider is attempted to be loaded to access nonsecurity hashes.

… algorithms

When OpenSSL is configured to only load "base+fips" providers into the
Null library context, md5 might not be available at all. In such cases
currently CPython fallsback to internal hashlib implementation is
there is one - as there might not be if one compiles python with
--with-builtin-hashlib-hashes=blake2. With this change "default"
provider is attempted to be loaded to access nonsecurity hashes.
@xnox xnox requested a review from tiran as a code owner April 24, 2024 15:37
@bedevere-app
Copy link

bedevere-app bot commented Apr 24, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@xnox
Copy link
Author

xnox commented Apr 25, 2024

The Ubuntu x OpenSSL 3.1.3 pipeline failure is false negative, fix for said pipeline is in #118262

@encukou
Copy link
Member

encukou commented May 7, 2024

This is not fixing a security issue, so it should not be backported to 3.10.
In general, please only open backport PRs after the main one is merged.

@encukou encukou closed this May 7, 2024
@xnox
Copy link
Author

xnox commented May 7, 2024

This is not fixing a security issue, so it should not be backported to 3.10. In general, please only open backport PRs after the main one is merged.

It is FedRAMP/FIPS compliance by-pass. This issue may allow using md5 without specifying "useforsecurity=False" on systems otherwise configured to be in FIPS-mode only. And is the primary reason why documentation mentions that certain distributions of python remove md5 module altogether.

Re about merge sequence, sure, will wait until main one is merged.

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.

2 participants