diff options
author | W. Trevor King <wking@drexel.edu> | 2009-07-18 15:17:11 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-07-18 15:17:11 -0400 |
commit | 8feacb745c3093bf89caf14899ea82edb637d3d4 (patch) | |
tree | 3adf87c1f690395470d4d7f47286dc8b1f28f162 /doc/module.mk | |
parent | f88fd2faac0d7cc550d69561afc5a59649a399da (diff) | |
download | bugseverywhere-8feacb745c3093bf89caf14899ea82edb637d3d4.tar.gz |
Major send_pgp_mime.py reorganization to better integrate with email.Message.
Now send_pgp_mime.py passes it's unittests again, and it should be
easier to use from be-handle-mail :).
Renamed Mail -> EncryptedMessageFactory, since its role is to generate
message bodies of various types (plain, signed, encrypted, ...)
Separated the header processing from Mail, now you need to
header_from_text()
your header text to create an email.Message which you can use in
EncrypedMessageFactory.sign(), .encrypt(), ... Once you've created
the body message you want, you can attach it to the header with
attach_root(header, root_part)
where both header and root_part are email.Message instances.
Made EncryptedMessageFactory doctests more robust, through the use of
# doctest: +ELLIPSIS, +NORMALIZE_WHITESPACE
which removed the need for the .strip*() methods.
Also added the configurable from_addr and to_addr, which allows you
to run the doctests with successful gpg calls. Just set them to
some address from your private keyring, and pass the passphrase for
that key in to your test via a file (or gpg-agent...)
python send_pgp_mime.py -tP path/to/pasphrase/file
Diffstat (limited to 'doc/module.mk')
0 files changed, 0 insertions, 0 deletions