summaryrefslogtreecommitdiff
path: root/guix/build/download.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-11-21 22:44:15 +0100
committerMarius Bakke <mbakke@fastmail.com>2019-11-21 22:44:15 +0100
commitb60d2bfff95c0859d7814c1fe9d0940c87edc2b4 (patch)
tree49d3339f93c9d9fad5c66609a1dc4964f2856f79 /guix/build/download.scm
parent0c6ab52243353e3417e5a9733bb089e4771cc86e (diff)
parenta31b9dac1cbda07225fcdffe03d13d68c4eab981 (diff)
downloadguix-patches-b60d2bfff95c0859d7814c1fe9d0940c87edc2b4.tar
guix-patches-b60d2bfff95c0859d7814c1fe9d0940c87edc2b4.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'guix/build/download.scm')
-rw-r--r--guix/build/download.scm13
1 files changed, 8 insertions, 5 deletions
diff --git a/guix/build/download.scm b/guix/build/download.scm
index a4c91550a6..141ef409d6 100644
--- a/guix/build/download.scm
+++ b/guix/build/download.scm
@@ -187,10 +187,13 @@ name decoding bug described at
DIRECTORY. Those authority certificates are checked when
'peer-certificate-status' is later called."
(let ((cred (make-certificate-credentials))
- (files (or (scandir directory
- (lambda (file)
- (string-suffix? ".pem" file)))
- '())))
+ (files (match (scandir directory (cut string-suffix? ".pem" <>))
+ ((or #f ())
+ ;; Some distros provide nothing but bundles (*.crt) under
+ ;; /etc/ssl/certs, so look for them.
+ (or (scandir directory (cut string-suffix? ".crt" <>))
+ '()))
+ (pem pem))))
(for-each (lambda (file)
(let ((file (string-append directory "/" file)))
;; Protect against dangling symlinks.
@@ -198,7 +201,7 @@ DIRECTORY. Those authority certificates are checked when
(set-certificate-credentials-x509-trust-file!*
cred file
x509-certificate-format/pem))))
- (or files '()))
+ files)
cred))
(define (peer-certificate session)