(der_cert_bytes)
return (PEM_HEADER + '\n' +
            textwrap.fill(f, 64) + '\n' +
            PEM_FOOTER + '\n')
Takes a certificate in binary DER format and returns the
    PEM version of it as a string.
Takes a certificate in binary DER format and returns the
    PEM version of it as a string.
Takes a certificate in binary DER format and returns the PEM version of it as a string .
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."""

    f = str(base64.standard_b64encode(der_cert_bytes), 'ASCII', 'strict')
    return (PEM_HEADER + '\n' +
            textwrap.fill(f, 64) + '\n' +
            PEM_FOOTER + '\n')
def DER_cert_to_PEM_cert ( der_cert_bytes ) : f = str ( base64 . standard_b64encode ( der_cert_bytes ) , 'ASCII' , 'strict' ) return ( PEM_HEADER + '\n' + textwrap . fill ( f , 64 ) + '\n' + PEM_FOOTER + '\n' )