mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
Adapt for new request_client_cert option in netlib.
This commit is contained in:
parent
bc88930fb7
commit
11cc48ca25
@ -1,7 +1,7 @@
|
||||
import socket, time
|
||||
import mock
|
||||
from netlib import tcp, http_auth, http
|
||||
from libpathod import pathoc
|
||||
from libpathod import pathoc, pathod
|
||||
import tutils, tservers
|
||||
from libmproxy import flow, proxy
|
||||
|
||||
@ -173,6 +173,7 @@ class TestHTTPConnectSSLError(tservers.HTTPProxTest):
|
||||
|
||||
class TestHTTPS(tservers.HTTPProxTest, CommonMixin):
|
||||
ssl = True
|
||||
ssloptions = pathod.SSLOptions(request_client_cert=True)
|
||||
clientcerts = True
|
||||
def test_clientcert(self):
|
||||
f = self.pathod("304")
|
||||
|
@ -69,6 +69,7 @@ class ProxyThread(threading.Thread):
|
||||
class ProxTestBase:
|
||||
# Test Configuration
|
||||
ssl = None
|
||||
ssloptions = False
|
||||
clientcerts = False
|
||||
certfile = None
|
||||
no_upstream_cert = False
|
||||
@ -77,8 +78,8 @@ class ProxTestBase:
|
||||
@classmethod
|
||||
def setupAll(cls):
|
||||
cls.tqueue = Queue.Queue()
|
||||
cls.server = libpathod.test.Daemon(ssl=cls.ssl)
|
||||
cls.server2 = libpathod.test.Daemon(ssl=cls.ssl)
|
||||
cls.server = libpathod.test.Daemon(ssl=cls.ssl, ssloptions=cls.ssloptions)
|
||||
cls.server2 = libpathod.test.Daemon(ssl=cls.ssl, ssloptions=cls.ssloptions)
|
||||
pconf = cls.get_proxy_config()
|
||||
config = proxy.ProxyConfig(
|
||||
no_upstream_cert = cls.no_upstream_cert,
|
||||
|
Loading…
Reference in New Issue
Block a user