From b476232066e0e528e892dcf38d5c48311ef2e0d7 Mon Sep 17 00:00:00 2001 From: Woodpecker CI Date: Sun, 7 Dec 2025 08:43:06 +0000 Subject: Woodpecker CI d881624f176cf3220436ba7f535efa8af4ce4b87 [SKIP CI] --- python/libressl.diff | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) (limited to 'python/libressl.diff') diff --git a/python/libressl.diff b/python/libressl.diff index ae5b6d37..13ffa85c 100644 --- a/python/libressl.diff +++ b/python/libressl.diff @@ -1,13 +1,27 @@ diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index a7a278de..6e6b5775 100644 +index 417d5ca5..aca63c59 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c -@@ -4728,7 +4728,7 @@ _ssl__SSLContext_sni_callback_set_impl(PySSLContext *self, PyObject *value) - return 0; - } +@@ -910,7 +910,7 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock, + } + + /* bpo43522 and OpenSSL < 1.1.1l: copy hostflags manually */ +-#if OPENSSL_VERSION_NUMBER < 0x101010cf ++#if OPENSSL_VERSION_NUMBER < 0x101010cf && !defined(LIBRESSL_VERSION_NUMBER) + X509_VERIFY_PARAM *ssl_verification_params = SSL_get0_param(self->ssl); + X509_VERIFY_PARAM *ssl_ctx_verification_params = SSL_CTX_get0_param(ctx); --#if OPENSSL_VERSION_NUMBER < 0x30300000L -+#if OPENSSL_VERSION_NUMBER < 0x30300000L && !defined(LIBRESSL_VERSION_NUMBER) - static X509_OBJECT *x509_object_dup(const X509_OBJECT *obj) +@@ -3870,10 +3870,12 @@ _ssl__SSLContext__host_flags_get_impl(PySSLContext *self) + /*[clinic end generated code: output=0f9db6654ce32582 input=8e3c49499eefd0e5]*/ { - int ok; + X509_VERIFY_PARAM *ssl_verification_params; +- unsigned int host_flags; ++ unsigned int host_flags = 0; + ++#ifndef LIBRESSL_VERSION_NUMBER + ssl_verification_params = SSL_CTX_get0_param(self->ctx); + host_flags = X509_VERIFY_PARAM_get_hostflags(ssl_verification_params); ++#endif + return PyLong_FromUnsignedLong(host_flags); + } + -- cgit v1.2.3