Mercurial > hg > nginx-tests
comparison ssl.t @ 1945:0b5ec15c62ed
Tests: compatibility with "openssl" app from OpenSSL 3.2.0.
OpenSSL 3.2.0's "openssl" app generates X.509v3 certificates unless explicitly
asked not to. Such certificates, even self-signed ones, cannot be used to sign
other certificates without CA:TRUE explicitly set in the basicConstraints
extension. As a result, tests doing so are now failing.
Fix is to provide basicConstraints with CA:TRUE for self-signed root
certificates used in "openssl ca" calls.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 29 Jan 2024 00:34:16 +0300 |
parents | a797d7428fa5 |
children | c924ae8d7104 |
comparison
equal
deleted
inserted
replaced
1944:c287864444f8 | 1945:0b5ec15c62ed |
---|---|
114 $t->write_file('openssl.conf', <<EOF); | 114 $t->write_file('openssl.conf', <<EOF); |
115 [ req ] | 115 [ req ] |
116 default_bits = 2048 | 116 default_bits = 2048 |
117 encrypt_key = no | 117 encrypt_key = no |
118 distinguished_name = req_distinguished_name | 118 distinguished_name = req_distinguished_name |
119 x509_extensions = myca_extensions | |
119 [ req_distinguished_name ] | 120 [ req_distinguished_name ] |
121 [ myca_extensions ] | |
122 basicConstraints = critical,CA:TRUE | |
120 EOF | 123 EOF |
121 | 124 |
122 my $d = $t->testdir(); | 125 my $d = $t->testdir(); |
123 | 126 |
124 $t->write_file('ca.conf', <<EOF); | 127 $t->write_file('ca.conf', <<EOF); |