0
0
mirror of https://github.com/openwrt/packages.git synced 2025-02-07 11:39:52 +00:00
packages/lang/python/python3/patches/027-fix-host-build-libressl.patch
Sean Khan 49e3c330d4 python3: Bump version 3.11 to 3.11.9
Also bumps setuptools to version 24.0

Run tested: aarch64, Dynalink DL-WRX36, Master Branch

Maintainer: Jeffery To <jeffery.to@gmail.com>

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-11-07 15:06:56 -08:00

36 lines
1.1 KiB
Diff

--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -4541,7 +4541,7 @@ set_sni_callback(PySSLContext *self, PyO
return 0;
}
-#if OPENSSL_VERSION_NUMBER < 0x30300000L
+#if OPENSSL_VERSION_NUMBER < 0x30300000L && !defined(LIBRESSL_VERSION_NUMBER)
static X509_OBJECT *x509_object_dup(const X509_OBJECT *obj)
{
int ok;
@@ -4614,7 +4614,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;
@@ -4669,7 +4673,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;