summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Burke <kevin@burke.dev>2021-11-02 22:14:02 -0700
committerDaniel Stenberg <daniel@haxx.se>2021-11-11 13:47:25 +0100
commitb7757c2b811927ed45588c2ef1a48ab60f11516d (patch)
tree4f86b3cab77c6c559ea6982ce457d94a762cbf2f
parenteed7473eebc37ebca98c1e5d72138e339e764d9d (diff)
downloadcurl-b7757c2b811927ed45588c2ef1a48ab60f11516d.tar.gz
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
-rw-r--r--configure.ac2
-rw-r--r--lib/vtls/rustls.c6
-rw-r--r--m4/curl-rustls.m48
3 files changed, 8 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 0c2384703..bbe15c058 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/lib/vtls/rustls.c b/lib/vtls/rustls.c
index 2ac97ce28..338dc7246 100644
--- a/lib/vtls/rustls.c
+++ b/lib/vtls/rustls.c
@@ -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(
diff --git a/m4/curl-rustls.m4 b/m4/curl-rustls.m4
index 2ac34b366..aa418cc63 100644
--- a/m4/curl-rustls.m4
+++ b/m4/curl-rustls.m4
@@ -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