Bug 1316629 - RIPEMD160 removed from hashlib in python 2.7.5-34.el7
RIPEMD160 removed from hashlib in python 2.7.5-34.el7
Status: CLOSED DUPLICATE of bug 1295459
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python (Show other bugs)
7.2
x86_64 Linux
unspecified Severity high
: rc
: ---
Assigned To: Python Maintainers
BaseOS QE - Apps
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-10 11:07 EST by Tom O'Connor
Modified: 2016-09-05 04:53 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-03-10 11:31:33 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tom O'Connor 2016-03-10 11:07:42 EST
Description of problem:

The RIPEMD160 hash is no longer available in python 2.7.5-34.el7.  Trying to create an instance results in a ValueError: unsupported hash type.  The previous release of python for EL7, python 2.7.5-16.el7, successfully created an instance of RIPEMD160.

Version-Release number of selected component (if applicable):

python 2.7.5-34.el7

How reproducible:

Always with 2.7.5-34.el7.


Steps to Reproduce:
1. Run python
2. import hashlib
3. r = hashlib.new('ripemd160')

Actual results:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/hashlib.py", line 111, in __hash_new
    return _hashlib.new(name, string, usedforsecurity)
ValueError: unsupported hash type

Expected results:

In prior release of python package, the same statements do not cause a ValueError exception, and the "r" variable is a usable instance of the RIPEMD160 hash.

Additional info:
Comment 2 Charalampos Stratakis 2016-03-10 11:31:33 EST
Duplicate.

*** This bug has been marked as a duplicate of bug 1295459 ***
Comment 3 Kiltro 2016-09-02 17:13:07 EDT
I have the same problem and bug 1295459 does not apply for me:

Traceback (most recent call last):
  File "keys.py", line 18, in <module>
    ripemd160 = hashlib.new('ripemd160')
  File "build/bdist.linux-x86_64/egg/hashlib.py", line 87, in __py_new
    elif name in ('SHA512', 'sha512', 'SHA384', 'sha384'):
  File "build/bdist.linux-x86_64/egg/hashlib.py", line 80, in __get_builtin_constructor
    elif name in ('SHA256', 'sha256', 'SHA224', 'sha224'):
ValueError: unsupported hash type

Python 2.7.12 (default, Jul  1 2016, 15:12:24) 
[GCC 5.4.0 20160609] on linux2


No solution on the entire web, you will be a hero.

Thanks!
Comment 4 Petr Viktorin 2016-09-05 04:12:08 EDT
Harris, could you check the patch in bug #1295459 fixes this?
Comment 5 Charalampos Stratakis 2016-09-05 04:53:41 EDT
(In reply to Petr Viktorin from comment #4)
> Harris, could you check the patch in bug #1295459 fixes this?

(In reply to Kiltro from comment #3)
> I have the same problem and bug 1295459 does not apply for me:

I just verified the reproducer and the patch does fix the issue.

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