add supported for pgp public keys attached as quoted-printable
This commit is contained in:
parent
16c67ee819
commit
9487a90c31
1 changed files with 1 additions and 0 deletions
|
@ -21,6 +21,7 @@ with open(f'{XDG_DATA_HOME}/gpg-email-helper/log', 'a') as log:
|
|||
if email.rfind('-----BEGIN PGP PUBLIC KEY BLOCK-----') != -1 and email.rfind('-----END PGP PUBLIC KEY BLOCK-----') != -1:
|
||||
public_key = email[email.rfind(
|
||||
'-----BEGIN PGP PUBLIC KEY BLOCK-----'):email.rfind('-----END PGP PUBLIC KEY BLOCK-----')+35]
|
||||
public_key = public_key.replace('=3D', '=') # quoted-printable attachments have the equals sign escaped as =3D apparently
|
||||
log.write(
|
||||
f'Attempted to import key from email: {gpg.Context(armor=True).key_import(public_key.encode())}\n')
|
||||
|
||||
|
|
Loading…
Reference in a new issue