[issue38550] hashlib missing algorithms

2022-01-17 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38550] hashlib missing algorithms

2019-10-21 Thread Mike Gilbert


Mike Gilbert  added the comment:

Ok, so this appears to be working correctly on master. Just the 3.7 branch is 
broken.

I think this is because we use OBJ_NAME_do_all instead of EVP_MD_do_all in 3.7.

I think backporting https://github.com/python/cpython/pull/16083 to 3.7 would 
resolve this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38550] hashlib missing algorithms

2019-10-21 Thread Mike Gilbert


Mike Gilbert  added the comment:

I see that generate_hash_name_list() calls EVP_MD_do_all() which calls  
OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_DIGESTS, NULL);

I'm not sure why that doesn't do the job here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38550] hashlib missing algorithms

2019-10-21 Thread Mike Gilbert


Mike Gilbert  added the comment:

Then the OpenSSL documentation is wrong, or Python is subsequently doing 
something to disable some algorithms.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38550] hashlib missing algorithms

2019-10-21 Thread Christian Heimes


Christian Heimes  added the comment:

According to OpenSSL documentation it is not necessary to call any init 
function. All ciphers and all digests are default options.

As of version 1.1.0 OpenSSL will automatically allocate all resources that it 
needs so no explicit initialisation is required. Similarly it will also 
automatically deinitialise as required.

OPENSSL_INIT_ADD_ALL_CIPHERS
With this option the library will automatically load and make available all 
libcrypto ciphers. This option is a default option.

OPENSSL_INIT_ADD_ALL_DIGESTS
With this option the library will automatically load and make available all 
libcrypto digests. This option is a default option.

https://www.openssl.org/docs/man1.1.0/man3/OPENSSL_init_crypto.html

--
nosy: +christian.heimes, gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38550] hashlib missing algorithms

2019-10-21 Thread Mike Gilbert


Change by Mike Gilbert :


--
keywords: +patch
pull_requests: +16418
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16873

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38550] hashlib missing algorithms

2019-10-21 Thread Mike Gilbert


New submission from Mike Gilbert :

After upgrading to Python 3.7.5, several algorithms are unavailable in the 
hashlib module.

This seems to have been caused by the "fix" for 
https://bugs.python.org/issue33936. I will submit a PR with a more appropriate 
change shortly.

Python 3.7.4:
>>> hashlib.algorithms_available
{'ripemd160', 'blake2s256', 'sha512', 'sha3-224', 'sha3_224', 'blake2s', 
'shake_128', 'sha3-384', 'sha3_384', 'whirlpool', 'md4', 'md5', 'sha512-224', 
'sha3-512', 'sha1', 'blake2b', 'sha384', 'md5-sha1', 'sha3-256', 'shake_256', 
'mdc2', 'sha224', 'blake2b512', 'shake128', 'sm3', 'sha256', 'shake256', 
'sha3_512', 'sha512-256', 'sha3_256'}

Python 3.7.5:
>>> hashlib.algorithms_available
{'sha224', 'sha256', 'sha3_224', 'blake2s', 'md5', 'sha3_256', 'sha384', 
'sha3_512', 'sha3_384', 'shake_256', 'blake2b', 'sha512', 'shake_128', 'sha1'}

--
components: Extension Modules
messages: 355080
nosy: floppymaster
priority: normal
severity: normal
status: open
title: hashlib missing algorithms
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com