blob: 9824bad805c6ada98a1e1081ce62433877848c14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
diff -urN Python-3.12.4.orig/Modules/_hashopenssl.c Python-3.12.4/Modules/_hashopenssl.c
--- Python-3.12.4.orig/Modules/_hashopenssl.c 2024-06-08 21:13:14.208249467 +0200
+++ Python-3.12.4/Modules/_hashopenssl.c 2024-06-08 21:57:05.029194044 +0200
@@ -44,7 +44,6 @@
#define MUNCH_SIZE INT_MAX
-#define PY_OPENSSL_HAS_SCRYPT 1
#if defined(NID_sha3_224) && defined(NID_sha3_256) && defined(NID_sha3_384) && defined(NID_sha3_512)
#define PY_OPENSSL_HAS_SHA3 1
#endif
@@ -921,12 +920,15 @@
if (digest == NULL) {
goto exit;
}
-
+#if defined(LIBRESSL_VERSION_NUMBER)
+ type = get_hashlib_state(module)->EVPtype;
+#else
if ((EVP_MD_flags(digest) & EVP_MD_FLAG_XOF) == EVP_MD_FLAG_XOF) {
type = get_hashlib_state(module)->EVPXOFtype;
} else {
type = get_hashlib_state(module)->EVPtype;
}
+#endif
self = newEVPobject(type);
if (self == NULL) {
|