openssl: define HAVE_SSL_GET_SHUTDOWN based on version number

Closes #4100
This commit is contained in:
Zenju 2019-07-09 11:24:41 +02:00 committed by Daniel Stenberg
parent 855887af79
commit 7e8f1916d6
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
6 changed files with 5 additions and 27 deletions

View File

@ -1826,13 +1826,9 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
if test X"$OPENSSL_ENABLED" = X"1"; then
dnl These can only exist if OpenSSL exists
dnl Older versions of Cyassl (some time before 2.9.4) don't have
dnl SSL_get_shutdown (but this check won't actually detect it there
dnl as it's a macro that needs the header files be included)
dnl OpenSSL_version is introduced in 3.0.0
AC_CHECK_FUNCS( RAND_egd \
SSL_get_shutdown \
SSLv2_client_method \
OpenSSL_version )

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@ -478,9 +478,6 @@
/* Define to 1 if you have the `socket' function. */
#define HAVE_SOCKET 1
/* Define to 1 if you have the `SSL_get_shutdown' function. */
/*#define HAVE_SSL_GET_SHUTDOWN 1*/
/* Define to 1 if you have the <ssl.h> header file. */
/* #undef HAVE_SSL_H */

View File

@ -541,9 +541,6 @@
/* Define to 1 if you have the `socket' function. */
#define HAVE_SOCKET 1
/* Define to 1 if you have the `SSL_get_shutdown' function. */
#define HAVE_SSL_GET_SHUTDOWN 1
/* Define to 1 if you have the <ssl.h> header file. */
/* #undef HAVE_SSL_H */

View File

@ -587,9 +587,6 @@
/* Define to 1 if you have the `socket' function. */
#cmakedefine HAVE_SOCKET 1
/* Define to 1 if you have the `SSL_get_shutdown' function. */
#cmakedefine HAVE_SSL_GET_SHUTDOWN 1
/* Define to 1 if you have the <ssl.h> header file. */
#cmakedefine HAVE_SSL_H 1

View File

@ -156,6 +156,10 @@
#define HAVE_X509_GET0_SIGNATURE 1
#endif
#if (OPENSSL_VERSION_NUMBER >= 0x1000200fL) /* 1.0.2 or later */
#define HAVE_SSL_GET_SHUTDOWN 1
#endif
#if OPENSSL_VERSION_NUMBER >= 0x10002003L && \
OPENSSL_VERSION_NUMBER <= 0x10002FFFL && \
!defined(OPENSSL_NO_COMP)

View File

@ -825,19 +825,6 @@ $ endif
$ goto cfgh_in_loop1
$ endif
$!
$ if key2 .eqs. "HAVE_SSL_GET_SHUTDOWN"
$ then
$ if f$search("''ssl_header_dir'ssl.h") .nes. ""
$ then
$ write tf "#ifndef ''key2'"
$ write tf "#define ''key2' 1"
$ write tf "#endif"
$ else
$ write tf "/* #undef ''key2' */"
$ endif
$ goto cfgh_in_loop1
$ endif
$!
$ if key2b .eqs. "RAND" .and. key2c .nes. "" .and. key2d .eqs. ""
$ then
$ if (key2c .eqs. "EGD") .or. -