Added signature verification to pisa_cli

This commit is contained in:
Salvatore Ingala
2019-10-18 13:18:39 +08:00
parent 414a4638bd
commit ca64b59277
3 changed files with 41 additions and 4 deletions

View File

@@ -31,8 +31,8 @@ class Watcher:
raise ValueError("No signing key provided. Please fix your pisa.conf")
else:
with open(SIGNING_KEY_FILE, "r") as key_file:
pubkey_pem = key_file.read().encode("utf-8")
self.signing_key = load_pem_private_key(pubkey_pem, password=None, backend=default_backend())
privkey_pem = key_file.read().encode("utf-8")
self.signing_key = load_pem_private_key(privkey_pem, password=None, backend=default_backend())
def add_appointment(self, appointment):
# Rationale: