comparison ssl_certificate_chain.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
comparison
equal deleted inserted replaced
1944:c287864444f8 1945:0b5ec15c62ed
69 $t->write_file('openssl.conf', <<EOF); 69 $t->write_file('openssl.conf', <<EOF);
70 [ req ] 70 [ req ]
71 default_bits = 2048 71 default_bits = 2048
72 encrypt_key = no 72 encrypt_key = no
73 distinguished_name = req_distinguished_name 73 distinguished_name = req_distinguished_name
74 x509_extensions = myca_extensions
74 [ req_distinguished_name ] 75 [ req_distinguished_name ]
76 [ myca_extensions ]
77 basicConstraints = critical,CA:TRUE
75 EOF 78 EOF
76 79
77 $t->write_file('ca.conf', <<EOF); 80 $t->write_file('ca.conf', <<EOF);
78 [ ca ] 81 [ ca ]
79 default_ca = myca 82 default_ca = myca