diff --git a/server/authentication.py b/server/authentication.py index ea2f435..dbc5e17 100644 --- a/server/authentication.py +++ b/server/authentication.py @@ -135,14 +135,14 @@ class Authetication: return dictionary - def loadServerPrivateKey(self) -> RsaKey: + def loadServerPrivateKey(self, passphrase: str) -> RsaKey: with open(self.CONFIG_FILE_LOCATION) as json_file: data = json.load(json_file) key = data['serverPrivateKey'] key = bytes.fromhex(key) try: - rsaKey = RSA.import_key(key) + rsaKey = RSA.import_key(key, passphrase) except ValueError: print('Invalid server private key!') return rsaKey