From 183133f3e912706f78dee766405f682b3a7a0b08 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Tue, 11 Mar 2025 21:09:47 -0700 Subject: [PATCH] gh-131127: Fix build on systems using LibreSSL. --- .../next/Library/2025-03-11-21-08-46.gh-issue-131127.whcVdY.rst | 1 + Modules/_ssl.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2025-03-11-21-08-46.gh-issue-131127.whcVdY.rst diff --git a/Misc/NEWS.d/next/Library/2025-03-11-21-08-46.gh-issue-131127.whcVdY.rst b/Misc/NEWS.d/next/Library/2025-03-11-21-08-46.gh-issue-131127.whcVdY.rst new file mode 100644 index 00000000000000..e8dfbf5f423ce3 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-03-11-21-08-46.gh-issue-131127.whcVdY.rst @@ -0,0 +1 @@ +Systems using LibreSSL now successfully build. diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 85e917fbbb7093..104713b986792e 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -4787,7 +4787,7 @@ _ssl__SSLContext_sni_callback_set_impl(PySSLContext *self, PyObject *value) 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;