Files
packages/lang/python/python3/patches/029-no-FIPS_mode.patch
Jeffery To 5e46567c39 python3: Fix hashlib module not compiled for host Python
This updates 026-openssl-feature-flags.patch with a newer version from
OpenBSD[1].

This also adds 029-no-FIPS_mode.patch to patch out a call to
FIPS_mode(). LibreSSL 3.4 does not have a function definition for
FIPS_mode.

[1]: 26a04435bf/lang/python/3.10/patches/patch-Modules__hashopenssl_c

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2023-05-24 16:47:52 +08:00

12 lines
433 B
Diff

--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -1938,7 +1938,7 @@ _hashlib_get_fips_mode_impl(PyObject *mo
return EVP_default_properties_is_fips_enabled(NULL);
#else
ERR_clear_error();
- int result = FIPS_mode();
+ int result = 0;
if (result == 0) {
// "If the library was built without support of the FIPS Object Module,
// then the function will return 0 with an error code of