Skip to content

Commit a625a0b

Browse files
Tests: compatibility with OpenSSL 3.2.0
OpenSSL 3.2.0 generates X.509v3 certificates by default. These certificates, even self-signed, cannot sign other certificates unless "CA:TRUE" is explicitly set in the basicConstraints extension. As a result, tests attempting this are currently failing. Fix is to provide "CA:TRUE" in the basicConstraints for self-signed root certificates used in "openssl ca" commands. Closes: #1202 Tested-by: Andrew Clayton <[email protected]> Reviewed-by: Andrew Clayton <[email protected]>
1 parent 5f60674 commit a625a0b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/unit/applications/tls.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,13 @@ def openssl_conf(self, rewrite=False, alt_names=None):
8585
default_bits = 2048
8686
encrypt_key = no
8787
distinguished_name = req_distinguished_name
88+
x509_extensions = myca_extensions
8889
8990
{a_sec if alt_names else ""}
90-
[ req_distinguished_name ]'''
91+
[ req_distinguished_name ]
92+
93+
[ myca_extensions ]
94+
basicConstraints = critical,CA:TRUE'''
9195
)
9296

9397
def load(self, script, name=None):

0 commit comments

Comments
 (0)