@@ -9595,9 +9595,9 @@ else
9595
9595
as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
9596
9596
fi
9597
9597
9598
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5
9599
- $as_echo_n "checking for SSL_library_init in -lssl... " >&6; }
9600
- if ${ac_cv_lib_ssl_SSL_library_init +:} false; then :
9598
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
9599
+ $as_echo_n "checking for SSL_new in -lssl... " >&6; }
9600
+ if ${ac_cv_lib_ssl_SSL_new +:} false; then :
9601
9601
$as_echo_n "(cached) " >&6
9602
9602
else
9603
9603
ac_check_lib_save_LIBS=$LIBS
@@ -9611,27 +9611,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9611
9611
#ifdef __cplusplus
9612
9612
extern "C"
9613
9613
#endif
9614
- char SSL_library_init ();
9614
+ char SSL_new ();
9615
9615
int
9616
9616
main ()
9617
9617
{
9618
- return SSL_library_init ();
9618
+ return SSL_new ();
9619
9619
;
9620
9620
return 0;
9621
9621
}
9622
9622
_ACEOF
9623
9623
if ac_fn_c_try_link "$LINENO"; then :
9624
- ac_cv_lib_ssl_SSL_library_init =yes
9624
+ ac_cv_lib_ssl_SSL_new =yes
9625
9625
else
9626
- ac_cv_lib_ssl_SSL_library_init =no
9626
+ ac_cv_lib_ssl_SSL_new =no
9627
9627
fi
9628
9628
rm -f core conftest.err conftest.$ac_objext \
9629
9629
conftest$ac_exeext conftest.$ac_ext
9630
9630
LIBS=$ac_check_lib_save_LIBS
9631
9631
fi
9632
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init " >&5
9633
- $as_echo "$ac_cv_lib_ssl_SSL_library_init " >&6; }
9634
- if test "x$ac_cv_lib_ssl_SSL_library_init " = xyes; then :
9632
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new " >&5
9633
+ $as_echo "$ac_cv_lib_ssl_SSL_new " >&6; }
9634
+ if test "x$ac_cv_lib_ssl_SSL_new " = xyes; then :
9635
9635
cat >>confdefs.h <<_ACEOF
9636
9636
#define HAVE_LIBSSL 1
9637
9637
_ACEOF
@@ -9701,9 +9701,9 @@ else
9701
9701
as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
9702
9702
fi
9703
9703
9704
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init " >&5
9705
- $as_echo_n "checking for library containing SSL_library_init ... " >&6; }
9706
- if ${ac_cv_search_SSL_library_init +:} false; then :
9704
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new " >&5
9705
+ $as_echo_n "checking for library containing SSL_new ... " >&6; }
9706
+ if ${ac_cv_search_SSL_new +:} false; then :
9707
9707
$as_echo_n "(cached) " >&6
9708
9708
else
9709
9709
ac_func_search_save_LIBS=$LIBS
@@ -9716,11 +9716,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9716
9716
#ifdef __cplusplus
9717
9717
extern "C"
9718
9718
#endif
9719
- char SSL_library_init ();
9719
+ char SSL_new ();
9720
9720
int
9721
9721
main ()
9722
9722
{
9723
- return SSL_library_init ();
9723
+ return SSL_new ();
9724
9724
;
9725
9725
return 0;
9726
9726
}
@@ -9733,25 +9733,25 @@ for ac_lib in '' ssleay32 ssl; do
9733
9733
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9734
9734
fi
9735
9735
if ac_fn_c_try_link "$LINENO"; then :
9736
- ac_cv_search_SSL_library_init =$ac_res
9736
+ ac_cv_search_SSL_new =$ac_res
9737
9737
fi
9738
9738
rm -f core conftest.err conftest.$ac_objext \
9739
9739
conftest$ac_exeext
9740
- if ${ac_cv_search_SSL_library_init +:} false; then :
9740
+ if ${ac_cv_search_SSL_new +:} false; then :
9741
9741
break
9742
9742
fi
9743
9743
done
9744
- if ${ac_cv_search_SSL_library_init +:} false; then :
9744
+ if ${ac_cv_search_SSL_new +:} false; then :
9745
9745
9746
9746
else
9747
- ac_cv_search_SSL_library_init =no
9747
+ ac_cv_search_SSL_new =no
9748
9748
fi
9749
9749
rm conftest.$ac_ext
9750
9750
LIBS=$ac_func_search_save_LIBS
9751
9751
fi
9752
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init " >&5
9753
- $as_echo "$ac_cv_search_SSL_library_init " >&6; }
9754
- ac_res=$ac_cv_search_SSL_library_init
9752
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new " >&5
9753
+ $as_echo "$ac_cv_search_SSL_new " >&6; }
9754
+ ac_res=$ac_cv_search_SSL_new
9755
9755
if test "$ac_res" != no; then :
9756
9756
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9757
9757
@@ -9768,6 +9768,37 @@ if test "x$ac_cv_func_SSL_get_current_compression" = xyes; then :
9768
9768
#define HAVE_SSL_GET_CURRENT_COMPRESSION 1
9769
9769
_ACEOF
9770
9770
9771
+ fi
9772
+ done
9773
+
9774
+ # Functions introduced in OpenSSL 1.1.0. We used to check for
9775
+ # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
9776
+ # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
9777
+ # doesn't have these OpenSSL 1.1.0 functions. So check for individual
9778
+ # functions.
9779
+ for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data RAND_OpenSSL
9780
+ do :
9781
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9782
+ ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9783
+ if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9784
+ cat >>confdefs.h <<_ACEOF
9785
+ #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9786
+ _ACEOF
9787
+
9788
+ fi
9789
+ done
9790
+
9791
+ # OpenSSL versions before 1.1.0 required setting callback functions, for
9792
+ # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
9793
+ # function was removed.
9794
+ for ac_func in CRYPTO_lock
9795
+ do :
9796
+ ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
9797
+ if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
9798
+ cat >>confdefs.h <<_ACEOF
9799
+ #define HAVE_CRYPTO_LOCK 1
9800
+ _ACEOF
9801
+
9771
9802
fi
9772
9803
done
9773
9804
0 commit comments