]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
vtls/rustls: update to compile with rustls-ffi v0.8.0
authorKevin Burke <kevin@burke.dev>
Wed, 3 Nov 2021 05:14:02 +0000 (22:14 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 11 Nov 2021 12:47:25 +0000 (13:47 +0100)
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

configure.ac
lib/vtls/rustls.c
m4/curl-rustls.m4

index 0c23847033ecb31c323d28750ec08630bc85506e..bbe15c05851c5cb9f3aedb8dd2fabbb69e65fab0 100644 (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
index 2ac97ce28e7e22f3b2e12347e3cc742b65ab2fd5..338dc72467f1c5ff2ce4de79e969e46383eeca2a 100644 (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(
index 2ac34b36695b164a7547082a9f906a55eb148b28..aa418cc635c568dc554e281106909e5ffcec1be4 100644 (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