Fix add backend in cert

This commit is contained in:
Mauricio Baeza 2021-01-10 14:21:32 -06:00
parent 8e4bf56846
commit b612991476
1 changed files with 2 additions and 1 deletions

View File

@ -223,7 +223,8 @@ class SATCertificate(object):
path.write_text(obj.key_enc)
args = f'openssl rsa -inform PEM -outform PEM -in "{str(path)}" -passin pass:{token}'
pem = subprocess.check_output(args, shell=True).decode()
key = serialization.load_pem_private_key(pem.encode(), password=None)
key = serialization.load_pem_private_key(
pem.encode(), password=None, default_backend())
digest = hashes.Hash(hashes.SHA512(), default_backend())
digest.update(obj.rfc.encode())