From 83c692beb5b97c3e47be974e1cc30fbe7a7dc75c Mon Sep 17 00:00:00 2001 From: Silversthorn Date: Tue, 15 Mar 2022 19:17:20 +0100 Subject: [PATCH] pylint happy !! --- app/classes/shared/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/classes/shared/helpers.py b/app/classes/shared/helpers.py index 9b5c8137..86bfe501 100644 --- a/app/classes/shared/helpers.py +++ b/app/classes/shared/helpers.py @@ -629,8 +629,8 @@ 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() - subjectAltNames_Ext = crypto.X509Extension(b'subjectAltName', False, ','.join([ 'DNS:%s' % socket.gethostname(), 'DNS:*.%s' % socket.gethostname(), 'DNS:localhost', 'DNS:*.localhost', 'DNS:127.0.0.1']).encode()) + alt_names = ','.join([ f'DNS:{socket.gethostname()}', f'DNS:*.{socket.gethostname()}', 'DNS:localhost', 'DNS:*.localhost', 'DNS:127.0.0.1']).encode() + subjectAltNames_Ext = crypto.X509Extension(b'subjectAltName', False, alt_names) basicConstraints_Ext = crypto.X509Extension(b"basicConstraints", True, b"CA:false") cert.add_extensions([subjectAltNames_Ext, basicConstraints_Ext]) cert.set_serial_number(random.randint(1,255))