From 223fed2de866bb60b8e9a6602b84ff21b164033c Mon Sep 17 00:00:00 2001 From: Disassembler Date: Tue, 6 Nov 2018 22:29:32 +0100 Subject: [PATCH] Reload nginx after selfsigned creation + verification fix --- usr/lib/python3.6/vmmgr/crypto.py | 2 +- usr/lib/python3.6/vmmgr/vmmgr.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/usr/lib/python3.6/vmmgr/crypto.py b/usr/lib/python3.6/vmmgr/crypto.py index f4eec8d..1860c76 100644 --- a/usr/lib/python3.6/vmmgr/crypto.py +++ b/usr/lib/python3.6/vmmgr/crypto.py @@ -86,7 +86,7 @@ def get_cert_info(): def verify_signature(file, signature): with open(SIG_PUB_FILE, 'rb') as f: pub_key = serialization.load_pem_public_key(f.read(), default_backend()) - pub_key.verify(packages_sig, packages, ec.ECDSA(hashes.SHA512())) + pub_key.verify(signature, file, ec.ECDSA(hashes.SHA512())) def adminpwd_hash(password): return bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode() diff --git a/usr/lib/python3.6/vmmgr/vmmgr.py b/usr/lib/python3.6/vmmgr/vmmgr.py index 906692b..a996b29 100644 --- a/usr/lib/python3.6/vmmgr/vmmgr.py +++ b/usr/lib/python3.6/vmmgr/vmmgr.py @@ -69,6 +69,8 @@ class VMMgr: os.chmod(ACME_CRON, 0o640) # Create selfsigned certificate with wildcard alternative subject name crypto.create_cert(self.domain) + # Reload nginx + self.reload_nginx() def request_acme_cert(self): # Remove all possible conflicting certificates requested in the past