mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
build: check required rustls-ffi version
Try to enforce that the Rustls vTLS backend is only used with rustls-ffi 0.15 - the documentation already describes this as the required version. Follow-up from https://github.com/curl/curl/issues/16890 Closes #16922
This commit is contained in:
parent
304b01b8cf
commit
2ade14b666
2 changed files with 31 additions and 10 deletions
|
|
@ -88,22 +88,16 @@ if test "x$OPT_RUSTLS" != xno; then
|
|||
else
|
||||
RUSTLS_LDFLAGS="-lpthread -ldl -lm"
|
||||
fi
|
||||
AC_CHECK_LIB(rustls, rustls_connection_read,
|
||||
[
|
||||
AC_DEFINE(USE_RUSTLS, 1, [if Rustls is enabled])
|
||||
RUSTLS_ENABLED=1
|
||||
USE_RUSTLS="yes"
|
||||
ssl_msg="rustls"
|
||||
test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
|
||||
],
|
||||
AC_MSG_ERROR([--with-rustls was specified but could not find Rustls.]),
|
||||
$RUSTLS_LDFLAGS)
|
||||
|
||||
LIB_RUSTLS="$PREFIX_RUSTLS/lib$libsuff"
|
||||
if test "$PREFIX_RUSTLS" != "/usr" ; then
|
||||
SSL_LDFLAGS="-L$LIB_RUSTLS $RUSTLS_LDFLAGS"
|
||||
SSL_CPPFLAGS="-I$PREFIX_RUSTLS/include"
|
||||
fi
|
||||
|
||||
dnl we will verify AC_CHECK_LIB later on
|
||||
AC_DEFINE(USE_RUSTLS, 1, [if Rustls is enabled])
|
||||
USE_RUSTLS="yes"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
@ -176,6 +170,17 @@ if test "x$OPT_RUSTLS" != xno; then
|
|||
if test -n "$link_pkgconfig"; then
|
||||
LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE rustls"
|
||||
fi
|
||||
|
||||
AC_CHECK_LIB(rustls, rustls_supported_hpke,
|
||||
[
|
||||
AC_DEFINE(USE_RUSTLS, 1, [if Rustls is enabled])
|
||||
RUSTLS_ENABLED=1
|
||||
USE_RUSTLS="yes"
|
||||
ssl_msg="rustls"
|
||||
test rustls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
|
||||
],
|
||||
AC_MSG_ERROR([--with-rustls was specified but could not find compatible Rustls.]),
|
||||
$RUSTLS_LDFLAGS)
|
||||
fi
|
||||
|
||||
test -z "$ssl_msg" || ssl_backends="${ssl_backends:+$ssl_backends, }$ssl_msg"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue