Reload nginx after selfsigned creation + verification fix

This commit is contained in:
Disassembler 2018-11-06 22:29:32 +01:00
parent 8b010a3aee
commit 223fed2de8
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
2 changed files with 3 additions and 1 deletions

View File

@ -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()

View File

@ -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