-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #71953 from NinjaTrappeur/nin-backport-acme
Backporting ACME v2 fix (#71291) to 19.09
- Loading branch information
Showing
12 changed files
with
399 additions
and
606 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
nixos/tests/common/letsencrypt/0001-Change-ACME-directory-endpoint-to-directory.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From c3b4004386074342d22cab5e129c1f7e623f4272 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?F=C3=A9lix=20Baylac-Jacqu=C3=A9?= <[email protected]> | ||
Date: Mon, 21 Oct 2019 10:56:13 +0200 | ||
Subject: [PATCH] Change ACME directory endpoint to /directory | ||
|
||
--- | ||
wfe/wfe.go | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/wfe/wfe.go b/wfe/wfe.go | ||
index e24797f..10d29fb 100644 | ||
--- a/wfe/wfe.go | ||
+++ b/wfe/wfe.go | ||
@@ -39,7 +39,7 @@ const ( | ||
// Note: We deliberately pick endpoint paths that differ from Boulder to | ||
// exercise clients processing of the /directory response | ||
// We export the DirectoryPath so that the pebble binary can reference it | ||
- DirectoryPath = "/dir" | ||
+ DirectoryPath = "/directory" | ||
noncePath = "/nonce-plz" | ||
newAccountPath = "/sign-me-up" | ||
acctPath = "/my-account/" | ||
-- | ||
2.23.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,9 @@ | ||
{ lib, nodes, ... }: { | ||
{ lib, nodes, pkgs, ... }: let | ||
letsencrypt-ca = nodes.letsencrypt.config.test-support.letsencrypt.caCert; | ||
in { | ||
networking.nameservers = [ | ||
nodes.letsencrypt.config.networking.primaryIPAddress | ||
]; | ||
|
||
nixpkgs.overlays = lib.singleton (self: super: { | ||
cacert = super.cacert.overrideDerivation (drv: { | ||
installPhase = (drv.installPhase or "") + '' | ||
cat "${nodes.letsencrypt.config.test-support.letsencrypt.caCert}" \ | ||
>> "$out/etc/ssl/certs/ca-bundle.crt" | ||
''; | ||
}); | ||
|
||
# Override certifi so that it accepts fake certificate for Let's Encrypt | ||
# Need to override the attribute used by simp_le, which is python3Packages | ||
python3Packages = (super.python3.override { | ||
packageOverrides = lib.const (pysuper: { | ||
certifi = pysuper.certifi.overridePythonAttrs (attrs: { | ||
postPatch = (attrs.postPatch or "") + '' | ||
cat "${self.cacert}/etc/ssl/certs/ca-bundle.crt" \ | ||
> certifi/cacert.pem | ||
''; | ||
}); | ||
}); | ||
}).pkgs; | ||
}); | ||
security.pki.certificateFiles = [ letsencrypt-ca ]; | ||
} |
Oops, something went wrong.