Opened 3 years ago

Last modified 2 years ago

#63857 closed defect

After upgrading packages to latest, including OpenSSL 3.0, Python can no longer use ripemd160 — at Version 6

Reported by: cculianu (Calin Culianu) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: openssl3

Description (last modified by cculianu (Calin Culianu))

I'm on Big Sur.

Python 3.6, 3.7, 3.8, and 3.9 can't use the hashlib hasher "ripemd160", even though that hasher is listed as "available".

See below:

$ python3
Python 3.10.0 (default, Nov  7 2021, 21:08:03) [Clang 12.0.5 (clang-1205.0.22.11)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> hashlib.algorithms_available
{'sha512_224', 'ripemd160', 'md5-sha1', 'sha1', 'shake_128', 'shake_256', 'sha512_256', 'sha256', 'whirlpool', 'blake2b', 'sha3_512', 'sha384', 'sm3', 'blake2s', 'sha3_224', 'sha224', 'mdc2', 'md4', 'md5', 'sha3_256', 'sha3_384', 'sha512'}
>>> hashlib.new('ripemd160')
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/hashlib.py", line 160, in __hash_new
    return _hashlib.new(name, data, **kwargs)
ValueError: [digital envelope routines] initialization error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/hashlib.py", line 166, in __hash_new
    return __get_builtin_constructor(name)(data)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/hashlib.py", line 123, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type ripemd160

I suspect this new problem has to do with the new OpenSSL3.0. Can we please revert back to 1.1? It seems 3 has caused a bunch of problems already (see my other ticket related to tor not building).

I had to manually modify my /opt/local/var/ macports stuff to force macports to use openssl1.1, and then I told it to reinstall Python3.9 with the -s options (rebuild from source), and now that works.

The problem is most definitely related to openssl 3.0 !!! Please fix!

Change History (6)

comment:1 Changed 3 years ago by cculianu (Calin Culianu)

Description: modified (diff)

comment:2 Changed 3 years ago by cculianu (Calin Culianu)

Port: python added

comment:3 Changed 3 years ago by cculianu (Calin Culianu)

Description: modified (diff)

comment:4 Changed 3 years ago by cculianu (Calin Culianu)

Description: modified (diff)

comment:5 Changed 3 years ago by cculianu (Calin Culianu)

Description: modified (diff)

comment:6 Changed 3 years ago by cculianu (Calin Culianu)

Description: modified (diff)
Note: See TracTickets for help on using tickets.