]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Load SSL's error strings in hashlib.
authorChristian Heimes <christian@cheimes.de>
Mon, 21 Oct 2013 17:48:22 +0000 (19:48 +0200)
committerChristian Heimes <christian@cheimes.de>
Mon, 21 Oct 2013 17:48:22 +0000 (19:48 +0200)
Without ERR_load_crypto_strings() functions like ERR_lib_error_string() return NULL.

Misc/NEWS
Modules/_hashopenssl.c

index 0221ffbbd97e57f8576affa07a8694db9e9a1c06..f60bbd181d5c6bb4065f3c6865a15102694c0ccf 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -16,6 +16,8 @@ Core and Builtins
 Library
 -------
 
+- Load SSL's error strings in hashlib.
+
 - Issue #18527: Upgrade internal copy of zlib to 1.2.8.
 
 - Issue #19274: Add a filterfunc parameter to PyZipFile.writepy.
index d71550059b0da669141df468ee52fae5374c5a24..222e5efe5e0c7e86c663822e45665a9f7469dd81 100644 (file)
@@ -847,6 +847,7 @@ PyInit__hashlib(void)
     PyObject *m, *openssl_md_meth_names;
 
     OpenSSL_add_all_digests();
+    ERR_load_crypto_strings();
 
     /* TODO build EVP_functions openssl_* entries dynamically based
      * on what hashes are supported rather than listing many