From 9fdb9461e77e40459b4a616bf11ce2bb1cdca75a Mon Sep 17 00:00:00 2001 From: Alexander Dushkin Date: Sun, 28 Jun 2020 00:20:46 -0400 Subject: [PATCH] Fix fake cert key length This changes the key length for the fake certificate to match the key length of the real certificate. A 1024-bit key prevented nginx from booting up on my server because of a "key too short" error. --- init-letsencrypt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init-letsencrypt.sh b/init-letsencrypt.sh index 13eaa75..a3f3cb0 100755 --- a/init-letsencrypt.sh +++ b/init-letsencrypt.sh @@ -31,7 +31,7 @@ echo "### Creating dummy certificate for $domains ..." path="/etc/letsencrypt/live/$domains" mkdir -p "$data_path/conf/live/$domains" docker-compose run --rm --entrypoint "\ - openssl req -x509 -nodes -newkey rsa:1024 -days 1\ + openssl req -x509 -nodes -newkey rsa:$rsa_key_size -days 1\ -keyout '$path/privkey.pem' \ -out '$path/fullchain.pem' \ -subj '/CN=localhost'" certbot