--- _ssl.c 2016-12-18 04:05:07.000000000 +0800 +++ _ssl.c.new 2017-07-06 14:51:26.000000000 +0800 @@ -99,6 +99,11 @@ # define OPENSSL_VERSION_1_1 1 #endif +/* X509_VERIFY_PARAM got added to OpenSSL in 0.9.8 */ +#if OPENSSL_VERSION_NUMBER >= 0x0090800fL +# define HAVE_OPENSSL_VERIFY_PARAM +#endif + /* Openssl comes with TLSv1.1 and TLSv1.2 between 1.0.0h and 1.0.1 http://www.openssl.org/news/changelog.html */ @@ -174,10 +179,13 @@ return store->objs; } +#ifdef HAVE_OPENSSL_VERIFY_PARAM static X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *store) { return store->param; } +#endif + #endif /* OpenSSL < 1.1.0 or LibreSSL */ @@ -271,11 +279,6 @@ # define OPENSSL_NO_COMP #endif -/* X509_VERIFY_PARAM got added to OpenSSL in 0.9.8 */ -#if OPENSSL_VERSION_NUMBER >= 0x0090800fL -# define HAVE_OPENSSL_VERIFY_PARAM -#endif - typedef struct { PyObject_HEAD