summaryrefslogtreecommitdiffhomepage
path: root/test/unit/applications/tls.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/applications/tls.py')
-rw-r--r--test/unit/applications/tls.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/test/unit/applications/tls.py b/test/unit/applications/tls.py
index fdf681ae..fb1b112c 100644
--- a/test/unit/applications/tls.py
+++ b/test/unit/applications/tls.py
@@ -8,8 +8,6 @@ from unit.applications.proto import TestApplicationProto
class TestApplicationTLS(TestApplicationProto):
def setup_method(self):
- super().setup_method()
-
self.context = ssl.create_default_context()
self.context.check_hostname = False
self.context.verify_mode = ssl.CERT_NONE
@@ -24,9 +22,9 @@ class TestApplicationTLS(TestApplicationProto):
'-x509',
'-new',
'-subj', '/CN=' + name + '/',
- '-config', self.temp_dir + '/openssl.conf',
- '-out', self.temp_dir + '/' + name + '.crt',
- '-keyout', self.temp_dir + '/' + name + '.key',
+ '-config', option.temp_dir + '/openssl.conf',
+ '-out', option.temp_dir + '/' + name + '.crt',
+ '-keyout', option.temp_dir + '/' + name + '.key',
],
stderr=subprocess.STDOUT,
)
@@ -38,8 +36,8 @@ class TestApplicationTLS(TestApplicationProto):
if key is None:
key = crt
- key_path = self.temp_dir + '/' + key + '.key'
- crt_path = self.temp_dir + '/' + crt + '.crt'
+ key_path = option.temp_dir + '/' + key + '.key'
+ crt_path = option.temp_dir + '/' + crt + '.crt'
with open(key_path, 'rb') as k, open(crt_path, 'rb') as c:
return self.conf(k.read() + c.read(), '/certificates/' + crt)
@@ -66,7 +64,7 @@ class TestApplicationTLS(TestApplicationProto):
return ssl.get_server_certificate(addr, ssl_version=ssl_version)
def openssl_conf(self):
- conf_path = self.temp_dir + '/openssl.conf'
+ conf_path = option.temp_dir + '/openssl.conf'
if os.path.exists(conf_path):
return