certificate.py 文件源码

python
阅读 39 收藏 0 点赞 0 评论 0

项目:pypy-std-ssl 作者: pypy 项目源码 文件源码
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')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号