aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-06-13 03:33:11 +0200
committerGuilhem Moulin <guilhem@fripost.org>2024-06-13 15:40:56 +0200
commita41444b8b1fe5349a4a33c45f1e96036845609bb (patch)
tree38d58e8f0efe45fbf560f2fce2d31bd9a5be33f0 /tests
parent3be911f0cf34dd8048d9ddf084950f964d4cd3dd (diff)
t/cert-install: Ensure the subjectName is lowercase.
Domain names are case insensitive so it shouldn't matter, but Let's Encrypt (staging) ACME server fails with 400 Bad Request (Invalid identifiers requested :: Cannot issue for "YXJCTT7S6K2RQLVO.lacme-test.guilhem.org": Domain name contains an invalid character) if the sub-domain part of the subjectName is left all-caps.
Diffstat (limited to 'tests')
-rw-r--r--tests/cert-install2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/cert-install b/tests/cert-install
index 4b3e820..4182790 100644
--- a/tests/cert-install
+++ b/tests/cert-install
@@ -30,7 +30,7 @@ grepstderr -Fxq "[bad3] Warning: Couldn't generate CSR, skipping"
# 'certificate' installs only the leaf certificate
openssl genpkey -algorithm RSA -out /etc/lacme/test1.key
-subject="/CN=$(head -c10 /dev/urandom | base32 -w0).$DOMAINNAME"
+subject="/CN=$(head -c10 /dev/urandom | base32 -w0 | tr "A-Z" "a-z").$DOMAINNAME"
cat >"/etc/lacme/lacme-certs.conf.d/test1.conf" <<- EOF
[test1]
certificate-key = /etc/lacme/test1.key