diff options
author | Rami <72725910+ramikg@users.noreply.github.com> | 2024-01-06 23:25:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-06 23:25:58 (GMT) |
commit | 84d1f76092c24c4d6614797cc10eb8a231397646 (patch) | |
tree | 23b774a14c70c212a057da70fda89a0be5bb7831 /Modules/_ssl.c | |
parent | a15a7735e69862fdfc0ed21bc1ade3a32833a01d (diff) | |
download | cpython-84d1f76092c24c4d6614797cc10eb8a231397646.zip cpython-84d1f76092c24c4d6614797cc10eb8a231397646.tar.gz cpython-84d1f76092c24c4d6614797cc10eb8a231397646.tar.bz2 |
gh-89532: Remove LibreSSL workarounds (#28728)
Remove LibreSSL specific workaround ifdefs from `_ssl.c` and delete the non-version-specific `_ssl_data.h` file (relevant for OpenSSL < 1.1.1, which we no longer support per PEP 644).
Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r-- | Modules/_ssl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 04c9f7d..bc30290 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -125,10 +125,10 @@ static void _PySSLFixErrno(void) { #include "_ssl_data_31.h" #elif (OPENSSL_VERSION_NUMBER >= 0x30000000L) #include "_ssl_data_300.h" -#elif (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER) +#elif (OPENSSL_VERSION_NUMBER >= 0x10101000L) #include "_ssl_data_111.h" #else -#include "_ssl_data.h" +#error Unsupported OpenSSL version #endif /* OpenSSL API 1.1.0+ does not include version methods */ @@ -867,7 +867,7 @@ newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock, } /* bpo43522 and OpenSSL < 1.1.1l: copy hostflags manually */ -#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION < 0x101010cf +#if OPENSSL_VERSION < 0x101010cf X509_VERIFY_PARAM *ssl_params = SSL_get0_param(self->ssl); X509_VERIFY_PARAM_set_hostflags(ssl_params, sslctx->hostflags); #endif |