Force \r\n line endings when performing PGP cryptography.
From RFC 3156, section 5 (OpenPGP signed data):
When the OpenPGP digital signature is generated:
(1) The data to be signed MUST first be converted to its content-
type specific canonical form. For text/plain, this means
conversion to an appropriate character set and conversion of
line endings to the canonical <CR><LF> sequence.
This will be easier with Python 3.3's policies:
email.policy.SMTP
Output serialized from a message will conform to the email and
SMTP RFCs. The only changed attribute is linesep, which is set to
\r\n.