unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#49213] [PATCH v1] services: certbot: Add option to use CSR file.
@ 2021-06-24 18:51 Raghav Gururajan via Guix-patches via
  2021-06-24 19:18 ` [bug#49213] [PATCH v2] " Raghav Gururajan via Guix-patches via
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Raghav Gururajan via Guix-patches via @ 2021-06-24 18:51 UTC (permalink / raw)
  To: 49213; +Cc: Raghav Gururajan

* gnu/services/certbot.scm (<certificate-configuration>): Add csr field.
(certbot-command): Modify.
* doc/guix.texi (Certificate Services): Document it.
---
 doc/guix.texi            | 6 ++++++
 gnu/services/certbot.scm | 6 +++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 15e8999447..689d6498a9 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -25934,6 +25934,12 @@ the documentation at @url{https://certbot.eff.org/docs/using.html#hooks}),
 and gives Let's Encrypt permission to log the public IP address of the
 requesting machine.
 
+@item @code{csr} (default: @code{#f})
+Path to a Certificate Signing Request (CSR) in DER or PEM format.  If @code{#f}
+is specified, this argument will not be passed to certbot.  If a value is passed,
+certbot uses it to obtain certificate, instead of using randomly generated
+private-key.
+
 @item @code{authentication-hook} (default: @code{#f})
 Command to be run in a shell once for each certificate challenge to be
 answered.  For this command, the shell variable @code{$CERTBOT_DOMAIN}
diff --git a/gnu/services/certbot.scm b/gnu/services/certbot.scm
index 1c67ff63f1..9a3822a679 100644
--- a/gnu/services/certbot.scm
+++ b/gnu/services/certbot.scm
@@ -55,6 +55,8 @@
                        (default '()))
   (challenge           certificate-configuration-challenge
                        (default #f))
+  (csr                     certificate-configuration-csr
+                       (default #f))
   (authentication-hook certificate-authentication-hook
                        (default #f))
   (cleanup-hook        certificate-cleanup-hook
@@ -95,7 +97,7 @@
               (match-lambda
                 (($ <certificate-configuration> custom-name domains challenge
                                                 authentication-hook cleanup-hook
-                                                deploy-hook)
+                                                deploy-hook csr)
                  (let ((name (or custom-name (car domains))))
                    (if challenge
                      (append
@@ -110,6 +112,7 @@
                           '("--register-unsafely-without-email"))
                       (if server `("--server" ,server) '())
                       (if rsa-key-size `("--rsa-key-size" ,rsa-key-size) '())
+                      (if csr `("--csr" ,csr) '())
                       (if authentication-hook
                           `("--manual-auth-hook" ,authentication-hook)
                           '())
@@ -125,6 +128,7 @@
                           '("--register-unsafely-without-email"))
                       (if server `("--server" ,server) '())
                       (if rsa-key-size `("--rsa-key-size" ,rsa-key-size) '())
+                      (if csr `("--csr" ,csr) '())
                       (if deploy-hook `("--deploy-hook" ,deploy-hook) '()))))))
               certificates)))
        (program-file
-- 
2.32.0





^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-07-01  8:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 18:51 [bug#49213] [PATCH v1] services: certbot: Add option to use CSR file Raghav Gururajan via Guix-patches via
2021-06-24 19:18 ` [bug#49213] [PATCH v2] " Raghav Gururajan via Guix-patches via
2021-06-24 21:58 ` [bug#49213] [PATCH v3] " Raghav Gururajan via Guix-patches via
2021-06-24 21:59 ` [bug#49213] [PATCH v4] " Raghav Gururajan via Guix-patches via
2021-06-24 22:20 ` [bug#49213] [PATCH v5] " Raghav Gururajan via Guix-patches via
2021-06-24 22:39 ` bug#49213: (no subject) Raghav Gururajan via Guix-patches via
2021-06-30 19:56   ` [bug#49213] " Maxime Devos
2021-06-30 20:16     ` Raghav Gururajan via Guix-patches via
2021-06-30 20:20       ` Jonathan Brielmaier
2021-07-01  8:05         ` Maxime Devos

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).