download: Access content-addressed mirrors over HTTPS.
authorLudovic Courtès <ludo@gnu.org>
Tue, 13 Nov 2018 21:27:58 +0000 (22:27 +0100)
committerLudovic Courtès <ludo@gnu.org>
Wed, 14 Nov 2018 20:34:08 +0000 (21:34 +0100)
Bug <http://bugs.gnu.org/22774> is no longer relevant now that we use
"builtin:download" exclusively.

* guix/download.scm (%content-addressed-mirrors): Use "https", not
"http".

guix/download.scm

index b74fd31..0f92e12 100644 (file)
   ;; List of content-addressed mirrors.  Each mirror is represented as a
   ;; procedure that takes a file name, an algorithm (symbol) and a hash
   ;; (bytevector), and returns a URL or #f.
-  ;; Note: Avoid 'https' to mitigate <http://bugs.gnu.org/22774>.
   '(begin
      (use-modules (guix base32) (guix base16))
 
      (list (lambda (file algo hash)
              ;; Files served by 'guix publish' are accessible under a single
              ;; hash algorithm.
-             (string-append "http://mirror.hydra.gnu.org/file/"
+             (string-append "https://mirror.hydra.gnu.org/file/"
                             file "/" (symbol->string algo) "/"
                             (bytevector->nix-base32-string hash)))
            (lambda (file algo hash)
              ;; 'tarballs.nixos.org' supports several algorithms.
-             (string-append "http://tarballs.nixos.org/"
+             (string-append "https://tarballs.nixos.org/"
                             (symbol->string algo) "/"
                             (bytevector->nix-base32-string hash)))
            (lambda (file algo hash)
              ;; tarballs, but tarballs are sometimes available (and can be
              ;; explicitly stored there.)  For example, see
              ;; <https://archive.softwareheritage.org/api/1/content/sha256:92d0fa1c311cacefa89853bdb53c62f4110cdfda3820346b59cbd098f40f955e/>.
-             (string-append "http://archive.softwareheritage.org/api/1/content/"
+             (string-append "https://archive.softwareheritage.org/api/1/content/"
                             (symbol->string algo) ":"
                             (bytevector->base16-string hash) "/raw/")))))