Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2032901

Summary: Cannot import hashlib: "code for md5 was not found"
Product: Red Hat Enterprise Linux 9 Reporter: Ales Musil <amusil>
Component: python3.9Assignee: Python Maintainers <python-maint>
Status: CLOSED DUPLICATE QA Contact:
Severity: urgent Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: bstinson, jwboyer, pviktori
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-12-16 09:04:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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 (pviktori) 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 (pviktori) 2021-12-16 09:04:34 UTC

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