[New-bugs-announce] [issue40482] _hashlib: register Python names as OpenSSL aliases

Christian Heimes report at bugs.python.org
Sun May 3 06:52:09 EDT 2020


New submission from Christian Heimes <lists at cheimes.de>:

Python uses valid Python identifiers for hashing algorithms while OpenSSL uses slightly different default names. For example OpenSSL uses "SHA3-256" while Python has "sha3_256". The function py_digest_by_name() in _hashopenssl.c maps from Python names to EVP_MD pointer.

It's possible to simplify the lookup by registering Python's aliases with OpenSSL, e.g. EVP_add_digest_alias(SN_sha3_512, "sha3_512").

Also see https://github.com/openssl/openssl/issues/11715

----------
assignee: christian.heimes
components: Library (Lib), SSL
messages: 367968
nosy: christian.heimes, gregory.p.smith
priority: normal
severity: normal
stage: patch review
status: open
title: _hashlib: register Python names as OpenSSL aliases
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40482>
_______________________________________


More information about the New-bugs-announce mailing list