This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author offero
Recipients offero
Date 2010-03-07.18:17:50
SpamBayes Score 0.0002425541
Marked as misclassified No
Message-id <1267985872.08.0.394416002746.issue8086@psf.upfronthosting.co.za>
In-reply-to
Content
Did some more research and found this as the culprit:

in Lib/ssl.py

#############################
...
def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
...
    return DER_cert_to_PEM_cert(dercert)

def DER_cert_to_PEM_cert(der_cert_bytes):

    """Takes a certificate in binary DER format and returns the
    PEM version of it as a string."""

    if hasattr(base64, 'standard_b64encode'):
        # preferred because older API gets line-length wrong
        f = base64.standard_b64encode(der_cert_bytes)
        return (PEM_HEADER + '\n' +
                textwrap.fill(f, 64) +
                PEM_FOOTER + '\n')
    else:
        return (PEM_HEADER + '\n' +
                base64.encodestring(der_cert_bytes) +
                PEM_FOOTER + '\n')

############################

Notice no '\n' before the PEM_FOOTER
History
Date User Action Args
2010-03-07 18:17:52offerosetrecipients: + offero
2010-03-07 18:17:52offerosetmessageid: <1267985872.08.0.394416002746.issue8086@psf.upfronthosting.co.za>
2010-03-07 18:17:50offerolinkissue8086 messages
2010-03-07 18:17:50offerocreate