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) {