How to make python2.7.18 work on RHEL7 with FIPS enabled

Posted on

Hi, experts

We would like to compile python2.7.18 on RHEL7, the python 2.7.18 build works fine, but when we enable FIPS mode on RHEL7, we saw error:

$ python -c 'import hashlib'

ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/usr/local/greenplum-db-devel/ext/python/lib/python2.7/hashlib.py", line 134, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/greenplum-db-devel/ext/python/lib/python2.7/hashlib.py", line 98, in __get_openssl_constructor
    f(usedforsecurity=False)
ValueError: unsupported hash type 
  • We would like to know is it possible python2.7.18 ca work on RHEL7 with fips enabled ?
  • If so, how can we achieve that ?
  • We noticed python2.7.18 source rpm on RHEL8 has a fips patch, so a fips patch for python2.7.18 on RHEL7 is needed to make python2.7.18 works correctly on RHEL7 with fips enabled ?
  • Is it true that a fips patch for python2.7.18 on RHEL7 should provided by RHEL , so that's why we can not found such patch in open source community ?

Responses