(der_cert_bytes)
return '\n'.join(ss)
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')
    ss = [PEM_HEADER]
    ss += [f[i:i+64] for i in range(0, len(f), 64)]
    ss.append(PEM_FOOTER + '\n')
    return '\n'.join(ss)
def DER_cert_to_PEM_cert ( der_cert_bytes ) : f = str ( base64 . standard_b64encode ( der_cert_bytes ) , 'ASCII' , 'strict' ) ss = [ PEM_HEADER ] ss += [ f [ i : i + 64 ] for i in range ( 0 , len ( f ) , 64 ) ] ss . append ( PEM_FOOTER + '\n' ) return '\n' . join ( ss )