Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
Open
Description
Bug report
If additional OpenSSL backends are loaded at runtime (this happens e.g. when importingPyOpenSSL), thehashlib.algorithms_available
doesn't get updated for the newly available hashes.
Trivial reproducer:
>>>importctypes,hashlib>>>ctypes.CDLL("libssl.so").OSSL_PROVIDER_load(None,b"legacy")-1311283920>>>"md4"inhashlib.algorithms_availableFalse>>>hashlib.new("md4")<md4_hashlib.HASHobject @0x7f404308faf0>
Your environment
- CPython versions tested on: 3.11.0b1, 3.10.4 with1b6acaa backported, 3.9.12
- Operating system and architecture: Gentoo Linux amd64
- OpenSSL version: 3.0.3