0
0
mirror of https://github.com/openwrt/packages.git synced 2025-09-14 17:09:41 +00:00
Files
packages/lang/python/python3/patches/027-fix-host-build-libressl.patch
Josef Schlehofer 3686cbe417 python3: update to version 3.11.13
Release notes:
https://docs.python.org/release/3.11.13/whatsnew/changelog.html#python-3-11-13

Fixes CVEs:
CVE 2024-12718
CVE 2025-4138
CVE 2025-4330
CVE 2025-4517

Patch refreshed

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2025-08-14 15:48:04 +02:00

36 lines
1.1 KiB
Diff

--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -4551,7 +4551,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;
@@ -4624,7 +4624,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;
@@ -4679,7 +4683,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;