]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
rustls: remove native_roots fallback
authorJacob Hoffman-Andrews <github@hoffman-andrews.com>
Mon, 14 Jun 2021 05:33:37 +0000 (22:33 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 14 Jun 2021 09:01:41 +0000 (11:01 +0200)
For the commandline tool, we expect to be passed
SSL_CONN_CONFIG(CAfile); for library use, the use should pass a set of
trusted roots (like in other TLS backends).

This also removes a dependency on Security.framework when building on
macOS.

Closes #7250

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

index d5247f936ade604313c902107e519b3eb330a6bf..03fe2b224d3cfad738154554f40b2a9fb4fcedd8 100644 (file)
@@ -332,15 +332,6 @@ cr_init_backend(struct Curl_easy *data, struct connectdata *conn,
       return CURLE_SSL_CACERT_BADFILE;
     }
   }
-  else {
-    result = rustls_client_config_builder_load_native_roots(config_builder);
-    if(result != RUSTLS_RESULT_OK) {
-      failf(data, "failed to load trusted certificates");
-      rustls_client_config_free(
-        rustls_client_config_builder_build(config_builder));
-      return CURLE_SSL_CACERT_BADFILE;
-    }
-  }
 
   backend->config = rustls_client_config_builder_build(config_builder);
   DEBUGASSERT(rconn == NULL);
index 6f8ea4ff820042381d97632d970778f623a1d231..2ac34b36695b164a7547082a9f906a55eb148b28 100644 (file)
@@ -63,9 +63,6 @@ if test "x$OPT_RUSTLS" != xno; then
       rustlslib=$OPT_RUSTLS/lib$libsuff
 
       LDFLAGS="$LDFLAGS $addld"
-      if (test -d "/System/Library/Frameworks/Security.framework" && test "x$cross_compiling" != "xyes"); then
-        LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Security"
-      fi
       if test "$addcflags" != "-I/usr/include"; then
          CPPFLAGS="$CPPFLAGS $addcflags"
       fi