Reload nginx after selfsigned creation + verification fix
This commit is contained in:
parent
8b010a3aee
commit
223fed2de8
@ -86,7 +86,7 @@ def get_cert_info():
|
|||||||
def verify_signature(file, signature):
|
def verify_signature(file, signature):
|
||||||
with open(SIG_PUB_FILE, 'rb') as f:
|
with open(SIG_PUB_FILE, 'rb') as f:
|
||||||
pub_key = serialization.load_pem_public_key(f.read(), default_backend())
|
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):
|
def adminpwd_hash(password):
|
||||||
return bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
|
return bcrypt.hashpw(password.encode(), bcrypt.gensalt()).decode()
|
||||||
|
@ -69,6 +69,8 @@ class VMMgr:
|
|||||||
os.chmod(ACME_CRON, 0o640)
|
os.chmod(ACME_CRON, 0o640)
|
||||||
# Create selfsigned certificate with wildcard alternative subject name
|
# Create selfsigned certificate with wildcard alternative subject name
|
||||||
crypto.create_cert(self.domain)
|
crypto.create_cert(self.domain)
|
||||||
|
# Reload nginx
|
||||||
|
self.reload_nginx()
|
||||||
|
|
||||||
def request_acme_cert(self):
|
def request_acme_cert(self):
|
||||||
# Remove all possible conflicting certificates requested in the past
|
# Remove all possible conflicting certificates requested in the past
|
||||||
|
Loading…
Reference in New Issue
Block a user