Skip to content

Commit b7ddbc8

Browse files
committed
Load SSL's error strings in hashlib.
Without ERR_load_crypto_strings() functions like ERR_lib_error_string() return NULL.
1 parent 1a82f7e commit b7ddbc8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Core and Builtins
1616
Library
1717
-------
1818

19+
- Load SSL's error strings in hashlib.
20+
1921
- Issue #18527: Upgrade internal copy of zlib to 1.2.8.
2022

2123
- Issue #19274: Add a filterfunc parameter to PyZipFile.writepy.

Modules/_hashopenssl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,7 @@ PyInit__hashlib(void)
847847
PyObject *m, *openssl_md_meth_names;
848848

849849
OpenSSL_add_all_digests();
850+
ERR_load_crypto_strings();
850851

851852
/* TODO build EVP_functions openssl_* entries dynamically based
852853
* on what hashes are supported rather than listing many

0 commit comments

Comments
 (0)