download: Honor /etc/ssl/certs when 'SSL_CERT_DIR' is not set.

* guix/build/download.scm (%x509-certificate-directory): Use
"/etc/ssl/certs" as a last resort.  This ensures, for instance, that
'guix download' honors system-wide certificates when SSL_CERT_DIR is
unset.
This commit is contained in:
Ludovic Courtès 2019-10-21 15:33:32 +02:00
parent a273796ce5
commit 674e143cf8
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -172,7 +172,8 @@ (define (register-tls-record-port record-port port)
(define %x509-certificate-directory (define %x509-certificate-directory
;; The directory where X.509 authority PEM certificates are stored. ;; The directory where X.509 authority PEM certificates are stored.
(make-parameter (or (getenv "GUIX_TLS_CERTIFICATE_DIRECTORY") (make-parameter (or (getenv "GUIX_TLS_CERTIFICATE_DIRECTORY")
(getenv "SSL_CERT_DIR")))) ;like OpenSSL (getenv "SSL_CERT_DIR") ;like OpenSSL
"/etc/ssl/certs")))
(define (set-certificate-credentials-x509-trust-file!* cred file format) (define (set-certificate-credentials-x509-trust-file!* cred file format)
"Like 'set-certificate-credentials-x509-trust-file!', but without the file "Like 'set-certificate-credentials-x509-trust-file!', but without the file