コード例 #1
0
 def _make_context(self, to_add_ca_cert_path):
     if HAS_URLLIB3_PYOPENSSLCONTEXT:
         context = PyOpenSSLContext(PROTOCOL)
     else:
         context = create_default_context()
     if to_add_ca_cert_path:
         context.load_verify_locations(to_add_ca_cert_path)
     return context
コード例 #2
0
ファイル: urls.py プロジェクト: ernstp/ansible
 def _make_context(self, to_add_ca_cert_path):
     if HAS_URLLIB3_PYOPENSSLCONTEXT:
         context = PyOpenSSLContext(PROTOCOL)
     else:
         context = create_default_context()
     if to_add_ca_cert_path:
         context.load_verify_locations(to_add_ca_cert_path)
     return context
コード例 #3
0
ファイル: urls.py プロジェクト: jilanisyed1/ansible-1
    def _make_context(self, to_add_ca_cert_path):
        if HAS_SSLCONTEXT:
            context = create_default_context()
        elif HAS_URLLIB3_PYOPENSSLCONTEXT:
            context = PyOpenSSLContext(PROTOCOL)
        else:
            raise NotImplementedError('Host libraries are too old to support creating an sslcontext')

        if to_add_ca_cert_path:
            context.load_verify_locations(to_add_ca_cert_path)
        return context
コード例 #4
0
ファイル: urls.py プロジェクト: awiddersheim/ansible
    def _make_context(self, to_add_ca_cert_path):
        if HAS_SSLCONTEXT:
            context = create_default_context()
        elif HAS_URLLIB3_PYOPENSSLCONTEXT:
            context = PyOpenSSLContext(PROTOCOL)
        else:
            raise NotImplementedError('Host libraries are too old to support creating an sslcontext')

        if to_add_ca_cert_path:
            context.load_verify_locations(to_add_ca_cert_path)
        return context