From 466d71db36f10d6e8d03dddd9c2607bec0095ee1 Mon Sep 17 00:00:00 2001 From: Silversthorn Date: Tue, 15 Mar 2022 07:32:08 +0000 Subject: [PATCH] Try to be cool with pylint (resolving Major issue ?) --- app/classes/shared/helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/classes/shared/helpers.py b/app/classes/shared/helpers.py index f0b619b1..6116780b 100644 --- a/app/classes/shared/helpers.py +++ b/app/classes/shared/helpers.py @@ -629,8 +629,9 @@ class Helpers: cert.get_subject().O = "Crafty Controller" cert.get_subject().OU = "Server Ops" cert.get_subject().CN = gethostname() + alt_names = ','.join([ 'DNS:%s' % socket.gethostname(), 'DNS:*.%s' % socket.gethostname(), 'DNS:localhost', 'DNS:*.localhost', 'DNS:127.0.0.1']).encode() cert.add_extensions([ - crypto.X509Extension(b'subjectAltName', False, ','.join([ 'DNS:%s' % socket.gethostname(), 'DNS:*.%s' % socket.gethostname(), 'DNS:localhost', 'DNS:*.localhost', 'DNS:127.0.0.1']).encode()), + crypto.X509Extension(b'subjectAltName', False, alt_names), crypto.X509Extension(b"basicConstraints", True, b"CA:false")]), cert.set_serial_number(random.randint(1,255)) cert.gmtime_adj_notBefore(0)