[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
11/13: pull: Add ‘--no-check-certificate’.
From: |
guix-commits |
Subject: |
11/13: pull: Add ‘--no-check-certificate’. |
Date: |
Wed, 25 Dec 2024 17:53:35 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 7d235a67998433d40a8f813f6990f5406a980ba7
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Dec 10 23:58:12 2024 +0100
pull: Add ‘--no-check-certificate’.
This can be tested with:
guix shell libfaketime -- faketime 2019-01-01 \
guix pull -q --no-check-certificate -p /tmp/p
* guix/scripts/pull.scm (%options, show-help): Add
‘--no-check-certificate’.
(%default-options): Add ‘verify-certificate?’ key.
(guix-pull): Honor it.
* doc/guix.texi (Invoking guix pull): Document it.
Change-Id: Ia9d7af1c64156b112e86027fb637e2e02dae6e3c
---
doc/guix.texi | 8 ++++++++
guix/scripts/pull.scm | 16 +++++++++++++---
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/doc/guix.texi b/doc/guix.texi
index 31deb5b003..da4d2f5ebc 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4643,6 +4643,14 @@ Make sure you understand its security implications
before using
@option{--disable-authentication}.
@end quotation
+@item --no-check-certificate
+Do not validate the X.509 certificates of HTTPS servers.
+
+When using this option, you have @emph{absolutely no guarantee} that you
+are communicating with the authentic server responsible for the given
+URL. Unless the channel is authenticated, this makes you vulnerable to
+``man-in-the-middle'' attacks.
+
@item --system=@var{system}
@itemx -s @var{system}
Attempt to build for @var{system}---e.g., @code{i686-linux}---instead of
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index 58d3cd7e83..76aed0b5cc 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013-2015, 2017-2023 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2015, 2017-2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
@@ -77,6 +77,7 @@
(debug . 0)
(verbosity . 1)
(authenticate-channels? . #t)
+ (verify-certificate? . #t)
(validate-pull . ,ensure-forward-channel-update)))
(define (show-help)
@@ -98,6 +99,9 @@ Download and deploy the latest version of Guix.\n"))
(display (G_ "
--disable-authentication
disable channel authentication"))
+ (display (G_ "
+ --no-check-certificate
+ do not validate the certificate of HTTPS servers"))
(display (G_ "
-N, --news display news compared to the previous generation"))
(display (G_ "
@@ -183,6 +187,9 @@ Download and deploy the latest version of Guix.\n"))
(option '("disable-authentication") #f #f
(lambda (opt name arg result)
(alist-cons 'authenticate-channels? #f result)))
+ (option '("no-check-certificate") #f #f
+ (lambda (opt name arg result)
+ (alist-cons 'verify-certificate? #f result)))
(option '(#\p "profile") #t #f
(lambda (opt name arg result)
(alist-cons 'profile (canonicalize-profile arg)
@@ -845,7 +852,8 @@ Use '~/.config/guix/channels.scm' instead."))
(profile (or (assoc-ref opts 'profile) %current-profile))
(current-channels (profile-channels profile))
(validate-pull (assoc-ref opts 'validate-pull))
- (authenticate? (assoc-ref opts 'authenticate-channels?)))
+ (authenticate? (assoc-ref opts 'authenticate-channels?))
+ (verify-certificate? (assoc-ref opts 'verify-certificate?)))
(cond
((assoc-ref opts 'query)
(process-query opts profile))
@@ -877,7 +885,9 @@ Use '~/.config/guix/channels.scm' instead."))
#:validate-pull
validate-pull
#:authenticate?
- authenticate?)))
+ authenticate?
+ #:verify-certificate?
+ verify-certificate?)))
(format (current-error-port)
(N_ "Building from this channel:~%"
"Building from these channels:~%"
- branch master updated (097fb030f6 -> e16cdcf37d), guix-commits, 2024/12/25
- 07/13: git: Remove Guile-Git < 0.4.0 compatibility fallback., guix-commits, 2024/12/25
- 05/13: gnu: nghttp3: Update to 1.7.0., guix-commits, 2024/12/25
- 04/13: gnu: ngtcp2: Update to 1.10.0., guix-commits, 2024/12/25
- 02/13: gnu: mygnuhealth: Update to 2.2.1., guix-commits, 2024/12/25
- 03/13: gnu: nano: Update to 8.3., guix-commits, 2024/12/25
- 01/13: services: syslog: fix configuration file argument, guix-commits, 2024/12/25
- 09/13: guix download: Honor ‘--no-check-certificate’ for ‘--git’., guix-commits, 2024/12/25
- 10/13: channels: Add #:verify-certificate? and honor it., guix-commits, 2024/12/25
- 11/13: pull: Add ‘--no-check-certificate’.,
guix-commits <=
- 06/13: services: rootless-podman: Fix PATH lookup for Shepherd services., guix-commits, 2024/12/25
- 08/13: git: Allow X.509 certificate verification to be disabled., guix-commits, 2024/12/25
- 12/13: inferior: Add #:verify-certificate? to ‘cached-channel-instance’., guix-commits, 2024/12/25
- 13/13: time-machine: Add ‘--no-check-certificate’., guix-commits, 2024/12/25