python类SSLv23_METHOD()的实例源码

ssl_pyopenssl.py 文件源码 项目:watcher 作者: nosmokingbandit 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def get_context(self):
        """Return an SSL.Context from self attributes."""
        # See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442473
        c = SSL.Context(SSL.SSLv23_METHOD)
        c.use_privatekey_file(self.private_key)
        if self.certificate_chain:
            c.load_verify_locations(self.certificate_chain)
        c.use_certificate_file(self.certificate)
        return c
plugin.py 文件源码 项目:enigma2-plugins 作者: opendreambox 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def __init__(self, privateKeyFileName, certificateChainFileName, sslmethod=SSL.SSLv23_METHOD):
        self.privateKeyFileName = privateKeyFileName
        self.certificateChainFileName = certificateChainFileName
        self.sslmethod = sslmethod
        self.cacheContext()


问题


面经


文章

微信
公众号

扫码关注公众号