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
评论列表
文章目录