Skip to content

BUG: Fix building NumPy in FIPS mode#27104

Merged
mattip merged 1 commit into
numpy:mainfrom
tiran:genapi-fips-md5
Aug 4, 2024
Merged

BUG: Fix building NumPy in FIPS mode#27104
mattip merged 1 commit into
numpy:mainfrom
tiran:genapi-fips-md5

Conversation

@tiran

@tiran tiran commented Aug 4, 2024

Copy link
Copy Markdown
Contributor

MD5 is an insecure cryptogrpahic hashing algorithm and is therefore blocked in FIPS mode. NumPy uses MD5 has digest algorithm without any security requirements. Use usedforsecurity=False flag to tell OpenSSL that the use of MD5 is okay in FIPS enforcing mode. I implemented the flag in Python 3.9 for exactly this purpose

Fixes: #27099

@mattip mattip left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Linting is failing on 85 characters, which is fine. We should change that rule.
Docs and 32-bit windows failures are not connected to this PR.

LGTM, let's let CI run to completion.

MD5 is an insecure cryptogrpahic hashing algorithm and is therefore
blocked in FIPS mode. NumPy uses MD5 has digest algorithm without any
security requirements. Use `usedforsecurity=False` flag to tell OpenSSL
that the use of MD5 is okay in FIPS enforcing mode. I implemented the
flag in Python 3.9 for exactly this purpose

Fixes: numpy#27099
Signed-off-by: Christian Heimes <christian@python.org>
@tiran tiran force-pushed the genapi-fips-md5 branch from 1b33b05 to 818515b Compare August 4, 2024 07:30
@tiran

tiran commented Aug 4, 2024

Copy link
Copy Markdown
Contributor Author

The other tests were green. I have fixed the linting violation and forced pushed the fix.

@mattip mattip merged commit cf2d77a into numpy:main Aug 4, 2024
@mattip

mattip commented Aug 4, 2024

Copy link
Copy Markdown
Member

Thanks @tiran

@seberg seberg added the 09 - Backport-Candidate PRs tagged should be backported label Aug 4, 2024
@charris charris changed the title Fix building NumPy in FIPS mode BUG: Fix building NumPy in FIPS mode Aug 4, 2024
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Building numpy on a FIPS mode system fails due to use of md5

4 participants