Fix RSA key unpacking on missing fingerprint (#1324)

This commit is contained in:
painor 2019-11-05 08:54:10 +01:00 committed by Lonami
parent 4839d8bf59
commit 4a1310dc21

View File

@ -66,7 +66,7 @@ def encrypt(fingerprint, data, *, use_old=False):
the cipher text, or None if no key matching this fingerprint is found.
"""
global _server_keys
key, old = _server_keys.get(fingerprint, None)
key, old = _server_keys.get(fingerprint, [None, None])
if (not key) or (old and not use_old):
return None