--- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -3859,7 +3859,11 @@ _ssl__SSLContext__host_flags_get_impl(PySSLContext *self) unsigned int host_flags; ssl_verification_params = SSL_CTX_get0_param(self->ctx); +#ifdef LIBRESSL_VERSION_NUMBER + host_flags = 0; +#else host_flags = X509_VERIFY_PARAM_get_hostflags(ssl_verification_params); +#endif return PyLong_FromUnsignedLong(host_flags); } .