cf: Check for OpenSSL 3.0

This check is admittedly lame.  But it's all I have time for at the
moment.  A better check would be a program that includes the correct
headers and succeeds if the OpenSSL version macro indicates it's at
3.0 or higher.  Or perhaps we could run the openssl(1) version command-
line and parse its output.  But checking for functions that are in 3.0
and not 1.1 will do for the time being.
This commit is contained in:
Nicolas Williams
2022-11-21 12:06:59 -06:00
committed by Jeffrey Altman
parent aa3355e3bf
commit ac8c1341fb

View File

@@ -134,6 +134,14 @@ if test "$with_openssl" != "no"; then
LDFLAGS="${saved_LDFLAGS}"
fi
if test "$openssl" = "yes"; then
AC_CHECK_LIB([crypto],
[OSSL_EC_curve_nid2name],
[AC_DEFINE_UNQUOTED([HAVE_OPENSSL_30], 1,
[whether OpenSSL is 3.0 or higher])]
)
fi
LIB_hcrypto='$(top_builddir)/lib/hcrypto/libhcrypto.la'
LIB_hcrypto_a='$(top_builddir)/lib/hcrypto/.libs/libhcrypto.a'
LIB_hcrypto_so='$(top_builddir)/lib/hcrypto/.libs/libhcrypto.so'