Files
packages/lang/python/python3/patches/027-fix-host-build-libressl.patch
Alexandru Ardelean 72aa700b23 python3: bump to version 3.14.4
Also add no-mips16 to PKG_BUILD_FLAGS.
Should fix mipsel_24kc_24kf builds.

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
2026-04-16 21:48:56 +03:00

39 lines
1.2 KiB
Diff

--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -74,7 +74,10 @@
# error "OPENSSL_THREADS is not defined, Python requires thread-safe OpenSSL"
#endif
-
+#ifdef LIBRESSL_VERSION_NUMBER
+/* LibreSSL does not define this for some reason, but it does implement it */
+unsigned int X509_VERIFY_PARAM_get_hostflags(X509_VERIFY_PARAM *param);
+#endif
struct py_ssl_error_code {
const char *mnemonic;
@@ -4898,7 +4901,11 @@ _ssl__SSLContext_cert_store_stats_impl(P
int x509 = 0, crl = 0, ca = 0, i;
store = SSL_CTX_get_cert_store(self->ctx);
+#if !defined(LIBRESSL_VERSION_NUMBER)
objs = X509_STORE_get1_objects(store);
+#else
+ objs = X509_STORE_get0_objects(store);
+#endif
if (objs == NULL) {
PyErr_SetString(PyExc_MemoryError, "failed to query cert store");
return NULL;
@@ -4954,7 +4961,11 @@ _ssl__SSLContext_get_ca_certs_impl(PySSL
}
store = SSL_CTX_get_cert_store(self->ctx);
+#if !defined(LIBRESSL_VERSION_NUMBER)
objs = X509_STORE_get1_objects(store);
+#else
+ objs = X509_STORE_get0_objects(store);
+#endif
if (objs == NULL) {
PyErr_SetString(PyExc_MemoryError, "failed to query cert store");
goto error;