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>
This commit is contained in:
Jeffery To
2023-05-24 15:56:32 +08:00
parent aa2102f70d
commit 5e46567c39
3 changed files with 67 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
--- 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