mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
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>
This commit is contained in:
parent
a15a7735e6
commit
84d1f76092
6 changed files with 7 additions and 6330 deletions
|
|
@ -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
|
||||
|
|
|
|||
6323
Modules/_ssl_data.h
6323
Modules/_ssl_data.h
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue