keys += more_keys
elif content_type == "application/pgp-keys":
- add_gpg_keys(payload, gpgme_ctx)
+ keys += add_gpg_keys(payload, gpgme_ctx)
elif content_type == "text/plain":
body += payload + "\n"
'-----BEGIN PGP PUBLIC KEY BLOCK-----',
'-----END PGP PUBLIC KEY BLOCK-----')
+ fps = []
for key in keys:
fp = io.BytesIO(key.encode('ascii'))
result = gpgme_ctx.import_(fp)
- fingerprint = result.imports[0][0]
+ fingerprint = result.imports[0][0]
debug("added gpg key: " + fingerprint)
+ fps += fingerprint
+
+ return fps
+
+
def decrypt_text (gpg_text, gpgme_ctx):
body = ""