Commit 0aaa4bf
Martin Panter
Issue #25940: Set "basic constraints" CA flag in self-signed certificate
This should allow test_ssl to switch from testing https://svn.python.org to
https://self-signed.pythontest.net. The serial number of the certificate was
also incremented, to stop Firefox from complaining and to keep it unique.
Commands used to modify the certificate:
openssl x509 < tls/self-signed-cert.pem \
-x509toreq -signkey tls/self-signed-key.pem > req.pem
cat <<'CONFIG' > config
[x509_extensions]
subjectAltName = DNS:self-signed.pythontest.net
basicConstraints = CA:true
[ ca ]
default_ca = CA_default
[ CA_default ]
database = index.txt
default_md = sha1
default_days = 3
certificate = tls/self-signed-cert.pem
private_key = tls/self-signed-key.pem
serial = serial
policy = policy_anything
default_startdate = 141102180929Z
default_enddate = 241030180929Z
[ policy_anything ]
countryName = optional
localityName = optional
organizationName = optional
commonName = optional
CONFIG
: > index.txt
echo A194F79c0A47CA53 > serial
openssl ca -config config -outdir . -notext \
-batch -extensions x509_extensions -infiles req.pem
mv A194F79C0A47CA53.pem tls/self-signed-cert.pem1 parent 28ca47a commit 0aaa4bf
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
0 commit comments