1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

refactor: fixes for compat with latest certauth>=1.1.0

This commit is contained in:
Ilya Kreymer 2015-03-30 09:38:42 -07:00
parent cda7705075
commit dd30e3f2a7
2 changed files with 5 additions and 5 deletions

View File

@ -109,12 +109,12 @@ class ProxyRouter(object):
# attempt to create the root_ca_file if doesn't exist
# (generally recommended to create this seperately)
certname = proxy_options.get('root_ca_name', self.CA_ROOT_NAME)
CertificateAuthority.generate_ca_root(ca_file, certname)
ca_name = proxy_options.get('root_ca_name', self.CA_ROOT_NAME)
certs_dir = proxy_options.get('certs_dir', self.CA_CERTS_DIR)
self.ca = CertificateAuthority(ca_file=ca_file,
certs_dir=certs_dir)
certs_dir=certs_dir,
ca_name=ca_name)
self.use_wildcard = proxy_options.get('use_wildcard_certs', True)
@ -252,7 +252,7 @@ class ProxyRouter(object):
hostname, port = env['REL_REQUEST_URI'].split(':')
if not self.use_wildcard:
_, certfile = self.ca.get_cert_for_host(hostname)
certfile = self.ca.get_cert_for_host(hostname)
else:
certfile = self.ca.get_wildcard_cert(hostname)

View File

@ -22,7 +22,7 @@ sesh_key = None
#=================================================================
# Inited once per module
def setup_module():
openssl_support = pytest.importorskip("OpenSSL")
certauth = pytest.importorskip("certauth")
def make_httpd(app):
return make_server('', 0, app)