Merge branch 'master' of https://git.kmlabz.com/BiztProtoBois/server
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Attila Szigeti 2021-04-25 17:50:50 +02:00
commit f6461273ab
1 changed files with 2 additions and 2 deletions

View File

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