]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38684: haslib: fix build when Blake2 not enabled in OpenSSL (#17043)
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Mon, 4 Nov 2019 14:55:56 +0000 (16:55 +0200)
committerChristian Heimes <christian@python.org>
Mon, 4 Nov 2019 14:55:56 +0000 (15:55 +0100)
Misc/NEWS.d/next/Build/2019-11-04-14-30-37.bpo-38684.aed593.rst [new file with mode: 0644]
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 (file)
index 0000000..c715ff9
--- /dev/null
@@ -0,0 +1 @@
+Fix _hashlib build when Blake2 is disabled, but OpenSSL supports it.
index b147dbe8b3c55da1332b6750c5963d95ceeb8eec..360e444e7f4aef7240ee057393cfe331aad4b0ea 100644 (file)
@@ -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