vtls/rustls: update to compile with rustls-ffi v0.8.0

Some method names, as well as the generated library name, were changed
in a recent refactoring.

Further, change the default configuration instructions to check for
Hyper in either "target/debug" or "target/release" - the latter
contains an optimized build configuration.

Fixes #7947
Closes #7948
This commit is contained in:
Kevin Burke 2021-11-02 22:14:02 -07:00 committed by Daniel Stenberg
parent eed7473eeb
commit b7757c2b81
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
3 changed files with 8 additions and 8 deletions

View File

@ -672,7 +672,7 @@ if test X"$want_hyper" != Xno; then
LIB_HYPER="-lhyper -ldl -lpthread -lm"
if test X"$want_hyper" != Xdefault; then
CPP_HYPER=-I"$want_hyper_path/capi/include"
LD_HYPER="-L$want_hyper_path/target/debug"
LD_HYPER="-L$want_hyper_path/target/release -L$want_hyper_path/target/debug"
fi
fi
if test -n "$LIB_HYPER"; then

View File

@ -27,7 +27,7 @@
#include "curl_printf.h"
#include <errno.h>
#include <crustls.h>
#include <rustls.h>
#include "inet_pton.h"
#include "urldata.h"
@ -309,10 +309,10 @@ cr_init_backend(struct Curl_easy *data, struct connectdata *conn,
config_builder = rustls_client_config_builder_new();
#ifdef USE_HTTP2
infof(data, "offering ALPN for HTTP/1.1 and HTTP/2");
rustls_client_config_builder_set_protocols(config_builder, alpn, 2);
rustls_client_config_builder_set_alpn_protocols(config_builder, alpn, 2);
#else
infof(data, "offering ALPN for HTTP/1.1 only");
rustls_client_config_builder_set_protocols(config_builder, alpn, 1);
rustls_client_config_builder_set_alpn_protocols(config_builder, alpn, 1);
#endif
if(!verifypeer) {
rustls_client_config_builder_dangerous_set_certificate_verifier(

View File

@ -39,8 +39,8 @@ if test "x$OPT_RUSTLS" != xno; then
if test -z "$OPT_RUSTLS" ; then
dnl check for lib first without setting any new path
AC_CHECK_LIB(crustls, rustls_client_session_read,
dnl libcrustls found, set the variable
AC_CHECK_LIB(rustls, rustls_client_session_read,
dnl librustls found, set the variable
[
AC_DEFINE(USE_RUSTLS, 1, [if rustls is enabled])
AC_SUBST(USE_RUSTLS, [1])
@ -67,7 +67,7 @@ if test "x$OPT_RUSTLS" != xno; then
CPPFLAGS="$CPPFLAGS $addcflags"
fi
AC_CHECK_LIB(crustls, rustls_connection_read,
AC_CHECK_LIB(rustls, rustls_connection_read,
[
AC_DEFINE(USE_RUSTLS, 1, [if rustls is enabled])
AC_SUBST(USE_RUSTLS, [1])
@ -84,7 +84,7 @@ if test "x$OPT_RUSTLS" != xno; then
AC_MSG_NOTICE([detected rustls])
check_for_ca_bundle=1
LIBS="-lcrustls -lpthread -ldl $LIBS"
LIBS="-lrustls -lpthread -ldl $LIBS"
if test -n "$rustlslib"; then
dnl when shared libs were found in a path that the run-time