test_iostream.py 文件源码

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

项目:microProxy 作者: mike820324 项目源码 文件源码
def test_check_hostname(self):
        def verify_cb(conn, x509, err_num, err_depth, err_code):
            return True

        server_future = self.server_start_tls(_server_ssl_options())
        client_future = self.client_start_tls(
            _client_ssl_options(SSL.VERIFY_PEER, verify_cb),
            server_hostname=b'localhost')
        with self.assertRaises(VerificationError):
            yield client_future
        # TODO: server will not raise.
        # with self.assertRaises(Exception):
        yield server_future
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号