From a76a343082d61d5303b61a9e4cbde4ab8515a1e7 Mon Sep 17 00:00:00 2001 From: Jakub Kądziołka Date: Tue, 14 Jan 2020 17:59:21 +0100 Subject: gnu: curl: Make libcurl respect SSL_CERT_DIR and SSL_CERT_FILE. * gnu/packages/patches/curl-use-ssl-cert-env.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/curl.scm (curl)[source]: Use the patch. [native-search-paths]: Add the new variables. Signed-off-by: Marius Bakke --- gnu/packages/curl.scm | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'gnu/packages/curl.scm') diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm index ee1cca449b..3d230dc1f0 100644 --- a/gnu/packages/curl.scm +++ b/gnu/packages/curl.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Roel Janssen ;;; Copyright © 2019 Ricardo Wurmus +;;; Copyright © 2020 Jakub Kądziołka ;;; ;;; This file is part of GNU Guix. ;;; @@ -57,7 +58,8 @@ version ".tar.xz")) (sha256 (base32 - "0nh3j90w6b97wqcgxjfq55qhkz9s38955fbhwzv2fsi7483j895p")))) + "0nh3j90w6b97wqcgxjfq55qhkz9s38955fbhwzv2fsi7483j895p")) + (patches (search-patches "curl-use-ssl-cert-env.patch")))) (build-system gnu-build-system) (outputs '("out" "doc")) ;1.2 MiB of man3 pages @@ -74,10 +76,20 @@ ("pkg-config" ,pkg-config) ("python" ,python-wrapper))) (native-search-paths - ;; Note: This search path is respected by the `curl` command-line tool only. - ;; Ideally we would bake this into libcurl itself so other users can benefit, - ;; but it's not supported upstream due to thread safety concerns. + ;; These variables are introduced by libcurl-use-ssl-cert-env.patch. (list (search-path-specification + (variable "SSL_CERT_DIR") + (separator #f) ;single entry + (files '("etc/ssl/certs"))) + (search-path-specification + (variable "SSL_CERT_FILE") + (file-type 'regular) + (separator #f) ;single entry + (files '("etc/ssl/certs/ca-certificates.crt"))) + ;; Note: This search path is respected by the `curl` command-line + ;; tool only. Patching libcurl to read it too would bring no + ;; advantages and require maintaining a more complex patch. + (search-path-specification (variable "CURL_CA_BUNDLE") (file-type 'regular) (separator #f) ;single entry -- cgit v1.2.3