aboutsummaryrefslogtreecommitdiffstats
path: root/.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-07-18 15:17:11 -0400
committerW. Trevor King <wking@drexel.edu>2009-07-18 15:17:11 -0400
commit8feacb745c3093bf89caf14899ea82edb637d3d4 (patch)
tree3adf87c1f690395470d4d7f47286dc8b1f28f162 /.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9
parentf88fd2faac0d7cc550d69561afc5a59649a399da (diff)
downloadbugseverywhere-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 '.be/bugs/9f910ee0-ff0f-4fa3-b1e3-79a4118e48e9')
0 files changed, 0 insertions, 0 deletions