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.
This commit is contained in:
@@ -137,11 +137,14 @@ class TestUnitTLS(unit.TestUnitApplicationTLS):
|
|||||||
'RSA (1024 bits)', 'certificate key rsa')
|
'RSA (1024 bits)', 'certificate key rsa')
|
||||||
|
|
||||||
def test_tls_certificate_key_ec(self):
|
def test_tls_certificate_key_ec(self):
|
||||||
|
self.load('empty')
|
||||||
|
|
||||||
subprocess.call(['openssl', 'ecparam', '-noout', '-genkey',
|
subprocess.call(['openssl', 'ecparam', '-noout', '-genkey',
|
||||||
'-out', self.testdir + '/ec.key',
|
'-out', self.testdir + '/ec.key',
|
||||||
'-name', 'prime256v1'])
|
'-name', 'prime256v1'])
|
||||||
|
|
||||||
subprocess.call(['openssl', 'req', '-x509', '-new',
|
subprocess.call(['openssl', 'req', '-x509', '-new',
|
||||||
|
'-config', self.testdir + '/openssl.conf',
|
||||||
'-key', self.testdir + '/ec.key', '-subj', '/CN=ec/',
|
'-key', self.testdir + '/ec.key', '-subj', '/CN=ec/',
|
||||||
'-out', self.testdir + '/ec.crt'])
|
'-out', self.testdir + '/ec.crt'])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user