@@ -8763,9 +8763,9 @@ else
8763
8763
as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
8764
8764
fi
8765
8765
8766
- {$as_echo " $as_me :${as_lineno-$LINENO } : checking forSSL_library_init in -lssl" >&5
8767
- $as_echo_n " checking forSSL_library_init in -lssl..." >&6 ; }
8768
- if ${ac_cv_lib_ssl_SSL_library_init +: } false ; then :
8766
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking forSSL_new in -lssl" >&5
8767
+ $as_echo_n "checking forSSL_new in -lssl... " >&6; }
8768
+ if ${ac_cv_lib_ssl_SSL_new +:} false; then :
8769
8769
$as_echo_n "(cached) " >&6
8770
8770
else
8771
8771
ac_check_lib_save_LIBS=$LIBS
@@ -8779,27 +8779,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8779
8779
#ifdef __cplusplus
8780
8780
extern "C"
8781
8781
#endif
8782
- charSSL_library_init ();
8782
+ charSSL_new ();
8783
8783
int
8784
8784
main ()
8785
8785
{
8786
- returnSSL_library_init ();
8786
+ returnSSL_new ();
8787
8787
;
8788
8788
return 0;
8789
8789
}
8790
8790
_ACEOF
8791
8791
if ac_fn_c_try_link "$LINENO"; then :
8792
- ac_cv_lib_ssl_SSL_library_init =yes
8792
+ ac_cv_lib_ssl_SSL_new =yes
8793
8793
else
8794
- ac_cv_lib_ssl_SSL_library_init =no
8794
+ ac_cv_lib_ssl_SSL_new =no
8795
8795
fi
8796
8796
rm -f core conftest.err conftest.$ac_objext \
8797
8797
conftest$ac_exeext conftest.$ac_ext
8798
8798
LIBS=$ac_check_lib_save_LIBS
8799
8799
fi
8800
- {$as_echo " $as_me :${as_lineno-$LINENO } : result:$ac_cv_lib_ssl_SSL_library_init " >&5
8801
- $as_echo " $ac_cv_lib_ssl_SSL_library_init " >&6 ; }
8802
- if test " x$ac_cv_lib_ssl_SSL_library_init " = xyes; then :
8800
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new " >&5
8801
+ $as_echo "$ac_cv_lib_ssl_SSL_new " >&6; }
8802
+ if test "x$ac_cv_lib_ssl_SSL_new " = xyes; then :
8803
8803
cat >>confdefs.h <<_ACEOF
8804
8804
#define HAVE_LIBSSL 1
8805
8805
_ACEOF
@@ -8869,9 +8869,9 @@ else
8869
8869
as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
8870
8870
fi
8871
8871
8872
- {$as_echo " $as_me :${as_lineno-$LINENO } : checking for library containingSSL_library_init " >&5
8873
- $as_echo_n " checking for library containingSSL_library_init ..." >&6 ; }
8874
- if ${ac_cv_search_SSL_library_init +: } false ; then :
8872
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containingSSL_new " >&5
8873
+ $as_echo_n "checking for library containingSSL_new ... " >&6; }
8874
+ if ${ac_cv_search_SSL_new +:} false; then :
8875
8875
$as_echo_n "(cached) " >&6
8876
8876
else
8877
8877
ac_func_search_save_LIBS=$LIBS
@@ -8884,11 +8884,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8884
8884
#ifdef __cplusplus
8885
8885
extern "C"
8886
8886
#endif
8887
- charSSL_library_init ();
8887
+ charSSL_new ();
8888
8888
int
8889
8889
main ()
8890
8890
{
8891
- returnSSL_library_init ();
8891
+ returnSSL_new ();
8892
8892
;
8893
8893
return 0;
8894
8894
}
@@ -8901,25 +8901,25 @@ for ac_lib in '' ssleay32 ssl; do
8901
8901
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8902
8902
fi
8903
8903
if ac_fn_c_try_link "$LINENO"; then :
8904
- ac_cv_search_SSL_library_init =$ac_res
8904
+ ac_cv_search_SSL_new =$ac_res
8905
8905
fi
8906
8906
rm -f core conftest.err conftest.$ac_objext \
8907
8907
conftest$ac_exeext
8908
- if ${ac_cv_search_SSL_library_init +: } false ; then :
8908
+ if ${ac_cv_search_SSL_new +:} false; then :
8909
8909
break
8910
8910
fi
8911
8911
done
8912
- if ${ac_cv_search_SSL_library_init +: } false ; then :
8912
+ if ${ac_cv_search_SSL_new +:} false; then :
8913
8913
8914
8914
else
8915
- ac_cv_search_SSL_library_init =no
8915
+ ac_cv_search_SSL_new =no
8916
8916
fi
8917
8917
rm conftest.$ac_ext
8918
8918
LIBS=$ac_func_search_save_LIBS
8919
8919
fi
8920
- {$as_echo " $as_me :${as_lineno-$LINENO } : result:$ac_cv_search_SSL_library_init " >&5
8921
- $as_echo " $ac_cv_search_SSL_library_init " >&6 ; }
8922
- ac_res=$ac_cv_search_SSL_library_init
8920
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new " >&5
8921
+ $as_echo "$ac_cv_search_SSL_new " >&6; }
8922
+ ac_res=$ac_cv_search_SSL_new
8923
8923
if test "$ac_res" != no; then :
8924
8924
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8925
8925
@@ -8936,6 +8936,37 @@ if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
8936
8936
#define HAVE_SSL_GET_CURRENT_COMPRESSION 1
8937
8937
_ACEOF
8938
8938
8939
+ fi
8940
+ done
8941
+
8942
+ # Functions introduced in OpenSSL 1.1.0. We used to check for
8943
+ # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
8944
+ # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
8945
+ # doesn't have these OpenSSL 1.1.0 functions. So check for individual
8946
+ # functions.
8947
+ for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
8948
+ do :
8949
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8950
+ ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8951
+ if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8952
+ cat >>confdefs.h <<_ACEOF
8953
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8954
+ _ACEOF
8955
+
8956
+ fi
8957
+ done
8958
+
8959
+ # OpenSSL versions before 1.1.0 required setting callback functions, for
8960
+ # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
8961
+ # function was removed.
8962
+ for ac_func in CRYPTO_lock
8963
+ do :
8964
+ ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
8965
+ if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
8966
+ cat >>confdefs.h <<_ACEOF
8967
+ #define HAVE_CRYPTO_LOCK 1
8968
+ _ACEOF
8969
+
8939
8970
fi
8940
8971
done
8941
8972