my device setup ubuntu22.04, OpenSSL 3.0.2, pyOpenSSL 21.0.0, python2 and python3 both exits. software mainly use python2 as default. NO python-openssl installed. the issue is.
Python 2.7.18 (default, Feb 1 2022, 10:30:50)
[GCC 11.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> hashlib.new('md4', b"text")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/hashlib.py", line 116, in __py_new
return __get_builtin_constructor(name)(string)
File "/usr/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md4
I saw some links which change openssl.cnf, I tested but it only works in python3 env. I want it to work in python2. anyone can help. thanks
MD4 hashlib support in Python 3.8
FYI: python2.7 is enforced due to business , cannot change