summaryrefslogtreecommitdiffhomepage
path: root/test/test_tls.py
diff options
context:
space:
mode:
authorSergey Kandaurov <pluknet@nginx.com>2018-10-18 18:46:21 +0300
committerSergey Kandaurov <pluknet@nginx.com>2018-10-18 18:46:21 +0300
commit3061e8333db784619d982b618c9792ec8da36e3a (patch)
treee3be4c2fb224c727424c9139448c2523edd6becb /test/test_tls.py
parent0ee8de55433725f3084a3ccd9664f1eca365e9af (diff)
downloadunit-3061e8333db784619d982b618c9792ec8da36e3a.tar.gz
unit-3061e8333db784619d982b618c9792ec8da36e3a.tar.bz2
Tests: provide openssl.conf in test_tls_certificate_key_ec.
Previously, test failed if openssl was unable to load config info, or the system's openssl.cnf was picked up, which is wrong as well.
Diffstat (limited to 'test/test_tls.py')
-rw-r--r--test/test_tls.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_tls.py b/test/test_tls.py
index 26bedcb7..aaf939ec 100644
--- a/test/test_tls.py
+++ b/test/test_tls.py
@@ -137,11 +137,14 @@ class TestUnitTLS(unit.TestUnitApplicationTLS):
'RSA (1024 bits)', 'certificate key rsa')
def test_tls_certificate_key_ec(self):
+ self.load('empty')
+
subprocess.call(['openssl', 'ecparam', '-noout', '-genkey',
'-out', self.testdir + '/ec.key',
'-name', 'prime256v1'])
subprocess.call(['openssl', 'req', '-x509', '-new',
+ '-config', self.testdir + '/openssl.conf',
'-key', self.testdir + '/ec.key', '-subj', '/CN=ec/',
'-out', self.testdir + '/ec.crt'])