From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 0GkvLWnU1GCtNAAAgWs5BA (envelope-from ) for ; Thu, 24 Jun 2021 20:52:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id OFLZKGnU1GDfLwAAbx9fmQ (envelope-from ) for ; Thu, 24 Jun 2021 18:52:25 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id ECAF8113F2 for ; Thu, 24 Jun 2021 20:52:24 +0200 (CEST) Received: from localhost ([::1]:53800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lwUSd-0005Lf-Gh for larch@yhetil.org; Thu, 24 Jun 2021 14:52:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwUSK-0005KX-5Y for guix-patches@gnu.org; Thu, 24 Jun 2021 14:52:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60831) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lwUSI-00042p-53 for guix-patches@gnu.org; Thu, 24 Jun 2021 14:52:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lwUSH-0000yn-TM for guix-patches@gnu.org; Thu, 24 Jun 2021 14:52:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49213] [PATCH v1] services: certbot: Add option to use CSR file. Resent-From: Raghav Gururajan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 24 Jun 2021 18:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49213 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49213@debbugs.gnu.org Cc: Raghav Gururajan X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16245607203755 (code B ref -1); Thu, 24 Jun 2021 18:52:01 +0000 Received: (at submit) by debbugs.gnu.org; 24 Jun 2021 18:52:00 +0000 Received: from localhost ([127.0.0.1]:44144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwUSG-0000yU-Gm for submit@debbugs.gnu.org; Thu, 24 Jun 2021 14:52:00 -0400 Received: from lists.gnu.org ([209.51.188.17]:41250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lwUSE-0000yL-RV for submit@debbugs.gnu.org; Thu, 24 Jun 2021 14:51:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33728) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwUSC-0005IF-Vl for guix-patches@gnu.org; Thu, 24 Jun 2021 14:51:58 -0400 Received: from out0.migadu.com ([2001:41d0:2:267::]:22239) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lwUS7-0003wD-Mv for guix-patches@gnu.org; Thu, 24 Jun 2021 14:51:56 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raghavgururajan.name; s=key1; t=1624560707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=Gjx8ow+V4RlUd9dHWUeOnEsR+eqgBiqA0i7I9b/u/Ms=; b=DNd60GXGuiM14dSCwKAMqnOQr2uu5Jg4Ezyh8xiKQrMIXh4JxmWEN/tV3PQ+8lv+dldbCp mckRub6y9ugtFiaG/AyrrabUu9eejcnXmOLmnpAyDTcgpQ/0LpfcAE6tQYjBODxu5HSLTC nhAvvsp1whE3c4VN80nNWvmYNqUY+rzQP5NAEf6mH9drbILkrI3hFd0tpknx+9aNKn5p3g 8EQV6rohxVhw1tLylzxgY4W71F19TfMcqC7gH/2h+Zs0qUz4wICcs8WKbvp2UGaSPO5HXk OWXSi1DIjkcjYoDW2qsomykoX5FZbnp0ua0QvMQg8pDfe+/BzJTJk8YElj3swg== Date: Thu, 24 Jun 2021 14:51:11 -0400 Message-Id: <20210624185111.5959-1-rg@raghavgururajan.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Auth-User: rg@raghavgururajan.name Received-SPF: pass client-ip=2001:41d0:2:267::; envelope-from=rg@raghavgururajan.name; helo=out0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Raghav Gururajan X-ACL-Warn: , Raghav Gururajan via Guix-patches From: Raghav Gururajan via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1624560745; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Gjx8ow+V4RlUd9dHWUeOnEsR+eqgBiqA0i7I9b/u/Ms=; b=KjYqhF9WWEGfx+kvsuDcVmwonFkfb0umeGFbn0qwXrXrmF+AWIMw2EDRLH//agdREz8rFB XrpvPgcb08cpGATKNXVBnPIs5mmvX1cEDfUMNh2aYOKo7+yHB+9IKQ7hjp+5EJPBDl6GZo b0vU1a90G2yQYnQKQtUGxR/v+NSlL5FHhoqJdb7gyegJG4IKA9UNJidjgDiyBSJ0JDntzY X5qJG3ihTG3pUXn4nOMD+K3h8+CtxQxsLX7D+mDa6aiW6tM0a0rcaGhhq9QxjuL54/TpSa /H7l7JEyr0C7qrhyJDTrZdPGCe3hnC5L7dDmdMip8NzVsFafZF6TuvoEy+ySWA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624560745; a=rsa-sha256; cv=none; b=dGy90Oj1ezunioxKXWc16262toevLhA2OpPGPzjvvp0mRjaO5d5UPQ0JLhVIrVGnh6qxim J35EvK+tgT/L0dWgn4xYxZrIikaQFk9ejkAwlQa4nf15YAFq+7831pFq/CmMxnL8lz4M43 b0DMXqIlyL17cWjtK4noBaNtcJIA35xfu7g9rIIOwjO/14P0GSDUkca0hzLC6u+5thwfRT ++H9zFW4pZK+xnfFuQd88fNKeVXkPSurJkbv5D2h8/8CCxORYImQWM12qF2O1leRPrUcu/ 2dTWCAFC8GBHOjd78/LED2MATTFy5H6SoIGxO7C6rpISDIynJpnNsUPMYDoQCw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=raghavgururajan.name header.s=key1 header.b=DNd60GXG; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 1.07 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=raghavgururajan.name header.s=key1 header.b=DNd60GXG; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: ECAF8113F2 X-Spam-Score: 1.07 X-Migadu-Scanner: scn1.migadu.com X-TUID: bXbuYAHGRZ+Y * gnu/services/certbot.scm (): 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 (($ 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