test: adding correct x509 v3 CA cert
This commit is contained in:
parent
8098fb031f
commit
80d03fb5b0
1 changed files with 3 additions and 6 deletions
|
|
@ -1265,15 +1265,12 @@ emailAddress = olof@hagsand.se
|
||||||
[ req_attributes ]
|
[ req_attributes ]
|
||||||
challengePassword = test
|
challengePassword = test
|
||||||
|
|
||||||
|
[ x509v3_extensions ]
|
||||||
|
basicConstraints = critical,CA:true
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# Generate CA cert
|
# Generate CA cert
|
||||||
# XXX v3 requires x509 version 1
|
openssl req -batch -new -x509 -extensions x509v3_extensions -days 1 -config $tmpdir/ca.cnf -keyout $cakey -out $cacert || err1 "Generate CA cert"
|
||||||
if [ $(openssl version|awk '{print $2}') = "3.3.0" ]; then
|
|
||||||
openssl req -batch -new -x509v1 -days 1 -config $tmpdir/ca.cnf -keyout $cakey -out $cacert || err1 "Generate CA cert"
|
|
||||||
else
|
|
||||||
openssl req -batch -new -x509 -days 1 -config $tmpdir/ca.cnf -keyout $cakey -out $cacert || err1 "Generate CA cert"
|
|
||||||
fi
|
|
||||||
rm -rf $tmpdir
|
rm -rf $tmpdir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue