From a41444b8b1fe5349a4a33c45f1e96036845609bb Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Thu, 13 Jun 2024 03:33:11 +0200 Subject: 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. --- tests/cert-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3