[layerindex,v2,03/18] dockersetup.py: letsencrypt 2048 bit rsa

Message ID 1f41512758b167502537f775a23c9639baed0889.1642138698.git.tim.orling@konsulko.com
State New
Headers show
Series [layerindex,v2,01/18] dockersetup.py: fix EMAIL_USE_SSL/TLS | expand

Commit Message

Tim Orling Jan. 14, 2022, 5:54 a.m. UTC
The minimum length for an RSA pem is 2048 for the dummy cert.

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 dockersetup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/dockersetup.py b/dockersetup.py
index 04dec91..6a0ab67 100755
--- a/dockersetup.py
+++ b/dockersetup.py
@@ -483,7 +483,7 @@  def setup_https(hostname, http_port, https_port, letsencrypt, cert, cert_key, em
             os.makedirs(local_letsencrypt_cert_dir)
         keyfile = os.path.join(letsencrypt_cert_subdir, 'privkey.pem')
         certfile = os.path.join(letsencrypt_cert_subdir, 'fullchain.pem')
-        return_code = subprocess.call(['openssl', 'req', '-x509', '-nodes', '-newkey', 'rsa:1024', '-days', '1', '-keyout', os.path.join(local_cert_dir, keyfile), '-out', os.path.join(local_cert_dir, certfile), '-subj', '/CN=localhost'], shell=False)
+        return_code = subprocess.call(['openssl', 'req', '-x509', '-nodes', '-newkey', 'rsa:2048', '-days', '1', '-keyout', os.path.join(local_cert_dir, keyfile), '-out', os.path.join(local_cert_dir, certfile), '-subj', '/CN=localhost'], shell=False)
         if return_code != 0:
             print("Dummy certificate generation failed")
             sys.exit(1)