Bug 2032901 - Cannot import hashlib: "code for md5 was not found"
Summary: Cannot import hashlib: "code for md5 was not found"
Keywords:
Status: CLOSED DUPLICATE of bug 1942527
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: python3.9
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Python Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-15 12:49 UTC by Ales Musil
Modified: 2021-12-16 09:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-16 09:04:34 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-105874 0 None None None 2021-12-15 12:55:05 UTC

Description Ales Musil 2021-12-15 12:49:48 UTC
Description of problem:
Everything that uses python hashlib is failing on el9stream. The available openssl is compiled without md5. 

Version-Release number of selected component (if applicable):
python3-3.9.9-2.el9.x86_64
openssl-3.0.0-5.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
1. import hashlib
 
Actual results:
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/usr/lib64/python3.9/hashlib.py", line 137, in __get_openssl_constructor
    f(usedforsecurity=False)
ValueError: [digital envelope routines] initialization error

Expected results:
Shouldn't fail

Additional info:
openssl is really compiled without md5: 
# echo "hello" | openssl dgst -md5
Error setting digest
800BD706F87F0000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:crypto/evp/evp_fetch.c:346:Global default library context, Algorithm (MD5 : 97), Properties ()
800BD706F87F0000:error:03000086:digital envelope routines:evp_md_init_internal:initialization error:crypto/evp/digest.c:234:

Comment 1 Petr Viktorin 2021-12-15 14:28:52 UTC
Are you running under "FIPS mode"?
Python does not support that yet.

Comment 2 Ales Musil 2021-12-15 14:48:10 UTC
(In reply to Petr Viktorin from comment #1)
> Are you running under "FIPS mode"?
> Python does not support that yet.

Yes it is FIPS mode

Comment 3 Petr Viktorin 2021-12-16 09:04:34 UTC

*** This bug has been marked as a duplicate of bug 1942527 ***


Note You need to log in before you can comment on or make changes to this bug.