getca.py 文件源码

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

项目:satellite-demo 作者: RedHatSatellite 项目源码 文件源码
def printcert(host, port, hostname):
    con = Connection(Context(TLSv1_METHOD), socket(AF_INET, SOCK_STREAM))
    con.connect((host, port))
    con.set_tlsext_host_name(hostname if hostname else host)
    con.do_handshake()
    con.shutdown()
    con.close()
    print dump_certificate(FILETYPE_PEM, walkchain(con.get_peer_cert_chain()))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号