Index: gen_dh_params ================================================================== --- gen_dh_params +++ gen_dh_params @@ -74,11 +74,11 @@ } dhp_bn = BN_bin2bn(dhp_2048, sizeof (dhp_2048), NULL); dhg_bn = BN_bin2bn(dhg_2048, sizeof (dhg_2048), NULL); -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#ifdef TCLTLS_OPENSSL_PRE_1_1_API dh->p = dhp_bn; dh->g = dhg_bn; if (dhp_bn == NULL || dhg_bn == NULL) { #else Index: tlsBIO.c ================================================================== --- tlsBIO.c +++ tlsBIO.c @@ -4,11 +4,11 @@ * Provides BIO layer to interface openssl to Tcl. */ #include "tlsInt.h" -#if OPENSSL_VERSION_NUMBER < 0x10100000L +#ifdef TCLTLS_OPENSSL_PRE_1_1_API #define BIO_get_data(bio) ((bio)->ptr) #define BIO_get_init(bio) ((bio)->init) #define BIO_get_shutdown(bio) ((bio)->shutdown) #define BIO_set_data(bio, val) (bio)->ptr = (val) #define BIO_set_init(bio, val) (bio)->init = (val) Index: tlsInt.h ================================================================== --- tlsInt.h +++ tlsInt.h @@ -53,20 +53,16 @@ #include #include #include #endif -#ifndef NO_TLS1_1 -# ifndef SSL_OP_NO_TLSv1_1 -# define NO_TLS1_1 -# endif -#endif - -#ifndef NO_TLS1_2 -# ifndef SSL_OP_NO_TLSv1_2 -# define NO_TLS1_2 -# endif +/* + * Determine if we should use the pre-OpenSSL 1.1.0 API + */ +#undef TCLTLS_OPENSSL_PRE_1_1 +#if (defined(LIBRESSL_VERSION_NUMBER)) || OPENSSL_VERSION_NUMBER < 0x10100000L +# define TCLTLS_OPENSSL_PRE_1_1_API 1 #endif #ifdef TCL_STORAGE_CLASS # undef TCL_STORAGE_CLASS #endif