pyopenssl.py 文件源码

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

项目:islam-buddy 作者: hamir 项目源码 文件源码
def getpeercert(self, binary_form=False):
        x509 = self.connection.get_peer_certificate()

        if not x509:
            return x509

        if binary_form:
            return OpenSSL.crypto.dump_certificate(
                OpenSSL.crypto.FILETYPE_ASN1,
                x509)

        return {
            'subject': (
                (('commonName', x509.get_subject().CN),),
            ),
            'subjectAltName': get_subj_alt_name(x509)
        }
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号