[Python-checkins] bpo-38684: haslib: fix build when Blake2 not enabled in OpenSSL (GH-17043)

Miss Islington (bot) webhook-mailer at python.org
Wed Nov 6 01:10:11 EST 2019


https://github.com/python/cpython/commit/7c20888e71304ecbf4bd3d595f364b7c691d30a0
commit: 7c20888e71304ecbf4bd3d595f364b7c691d30a0
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-11-05T22:10:05-08:00
summary:

bpo-38684: haslib: fix build when Blake2 not enabled in OpenSSL (GH-17043)

(cherry picked from commit 6552563b3d5061816720a5a6c7d4ffd6ba35b98b)

Co-authored-by: Alexandru Ardelean <ardeleanalex at gmail.com>

files:
A Misc/NEWS.d/next/Build/2019-11-04-14-30-37.bpo-38684.aed593.rst
M Modules/_hashopenssl.c

diff --git a/Misc/NEWS.d/next/Build/2019-11-04-14-30-37.bpo-38684.aed593.rst b/Misc/NEWS.d/next/Build/2019-11-04-14-30-37.bpo-38684.aed593.rst
new file mode 100644
index 0000000000000..c715ff9704127
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2019-11-04-14-30-37.bpo-38684.aed593.rst
@@ -0,0 +1 @@
+Fix _hashlib build when Blake2 is disabled, but OpenSSL supports it.
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
index 1513e4e35edc6..3e5f9c3e0df6a 100644
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -42,7 +42,7 @@
 #define PY_OPENSSL_HAS_SHAKE 1
 #endif
 
-#ifdef NID_blake2b512
+#if defined(NID_blake2b512) && !defined(OPENSSL_NO_BLAKE2)
 #define PY_OPENSSL_HAS_BLAKE2 1
 #endif
 



More information about the Python-checkins mailing list