2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-03 23:15:33 +00:00

komrade update!

This commit is contained in:
quadrismegistus 2020-09-17 16:31:14 +01:00
parent 3207d5648c
commit dde300c7ad

View File

@ -227,12 +227,13 @@ KEYMAKER_DEFAULT_KEY_TYPES = {
def get_key_obj(keyname,data,key_types=KEYMAKER_DEFAULT_KEY_TYPES):
if keyname.endswith('_decr'):
try:
data_s = data.decode()
if data_s == KomradeSymmetricKeyWithPassphrase.__name__:
if data_s == KEY_TYPE_SYMMETRIC_WITH_PASSPHRASE:
return KomradeSymmetricKeyWithPassphrase()
except UnicodeDecodeError:
pass
return KomradeSymmetricKeyWithoutPassphrase(data)
return key_types[keyname](data)