Inline PGP Within HTML
Ben McGinnes
ben at adversary.org
Fri May 1 00:45:13 UTC 2020
On Thu, Apr 30, 2020 at 10:53:32AM -0400, Mark H. Wood wrote:
>
> A couple more ideas:
>
> 'maildrop' comes with some nice tools for working with mail in
> scripts. (It's also a rather good filtering / routing / piping /
> you-name-it MDA.)
Maildrop is awesome and so much better than procmail.
> Python has some nice standard library classes that are really good
> at working with mailboxes (all kinds) and individual messages.
Yes, it does.
It can also be used very well with the Python bindings for the GnuPG
Project's GPGME API. For example, here's a key import practiced on
Kevin's key (just because, since you can see that result.unchanged is
true and thus already had it).
Python 3.8.2 (default, Apr 10 2020, 16:52:52)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.13.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import requests
In [2]: import gpg
In [3]: url = "http://www.8t8.us/configs/80316BDA.asc.pubkey"
In [4]: r = requests.get(url)
In [5]: result = gpg.Context().key_import(r.content)
In [6]: len(result.imports)
Out[6]: 1
In [7]: print(result)
ImportResult(considered=1, imported=0, imported_rsa=0, imports=[ImportStatus(fpr='8975A9B33AA37910385C5308ADEF768480316BDA', result=0, status=0)], new_revocations=0, new_signatures=0, new_sub_keys=0, new_user_ids=0, no_user_id=0, not_imported=0, secret_imported=0, secret_read=0, secret_unchanged=0, skipped_new_keys=0, skipped_v3_keys=0, unchanged=1)
In [8]:
It's also documented well enough that getting it to behave with with
all sorts of obscure custom stuff should be fairly straight forward.
http://files.au.adversary.org/crypto/gpgme-python-howto.xhtml
Obligatory disclaimer: I wrote the HOWTO and worked on the bindings
extensively.
Regards,
Ben
P.S. The HOWTO is hosted on AWS S3, so you can make it HTTPS if you
want to trigger and then bypass the SSL wildcard certificate
mismatch error message.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.mutt.org/pipermail/mutt-users/attachments/20200501/d79cdc52/attachment-0001.asc>
More information about the Mutt-users
mailing list