Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bin/certified-ca
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ prompt = no
[x509_extensions]
EOF
echo "basicConstraints = critical, CA:TRUE, pathlen:1"
if_echo "$ROOT_CRL_URL" "crlDistributionPoints = URI:$ROOT_CRL_URL"
cat <<EOF
keyUsage = critical, cRLSign, keyCertSign, nonRepudiation
subjectKeyIdentifier = hash
Expand All @@ -156,7 +157,7 @@ then
fi
fi

certified-csr --bits="$BITS" --ca --crl-url="$ROOT_CRL_URL" --days="$DAYS" --db="." $ENCRYPT --issuer="$CN" --issuer-name="root-ca" --name="ca" --ocsp-url="$OCSP_URL" --password="$INTERMEDIATE_PASSWORD" C="$C" CN="$CN" L="$L" O="$O" ST="$ST"
certified-csr --bits="$BITS" --ca --crl-url="$CRL_URL" --days="$DAYS" --db="." $ENCRYPT --issuer="$CN" --issuer-name="root-ca" --name="ca" --ocsp-url="$OCSP_URL" --password="$INTERMEDIATE_PASSWORD" C="$C" CN="$CN" L="$L" O="$O" ST="$ST"
certified-crt --ca-password="$ROOT_PASSWORD" --days="$DAYS" --db="." --name="ca" CN="$CN"

git init -q
Expand Down
5 changes: 4 additions & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ openssl x509 -in "etc/ssl/certs/ca.crt" -noout -text |
grep -E -q '(RSA )?Public[ -]Key: \(4096 bit\)'
openssl x509 -in "etc/ssl/certs/ca.crt" -noout -text |
grep -A"3" "X509v3 CRL Distribution Points" |
grep -q "http://example.com/ca.crl"
openssl x509 -in "etc/ssl/certs/root-ca.crt" -noout -text |
grep -A"3" "X509v3 CRL Distribution Points" |
grep -q "http://example.com/root-ca.crl"
openssl x509 -in "etc/ssl/certs/ca.crt" -noout -text |
grep -q "OCSP - URI:http://ocsp.example.com"
Expand Down Expand Up @@ -189,7 +192,7 @@ certified CN="Intermediate Revoked" && false
certified-ca --root-password="root-password" CN="Certified CA"
openssl x509 -in "etc/ssl/certs/ca.crt" -noout -text |
grep -A"3" "X509v3 CRL Distribution Points" |
grep -q "http://example.com/root-ca.crl"
grep -q "http://example.com/ca.crl"
certified CN="Intermediate Regenerated"
openssl x509 -in "etc/ssl/certs/intermediate-regenerated.crt" -noout -text |
grep -A"3" "X509v3 CRL Distribution Points" |
Expand Down