ssl_protocol_test.py 文件源码

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

项目:httplib2 作者: httplib2 项目源码 文件源码
def testSslCertValidationWithSelfSignedCaCert(self):
    if sys.version_info >= (2, 7):
      other_ca_certs = os.path.join(
          os.path.dirname(os.path.abspath(httplib2.__file__ )), 'test',
          'other_cacerts.txt')
      http = httplib2.Http(ca_certs=other_ca_certs)
      if sys.platform != 'darwin':
        with self.assertRaises(httplib2.SSLHandshakeError):
          http.request('https://www.google.com/', 'GET')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号