Skip to content
Merged
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
24 changes: 23 additions & 1 deletion certificates-generation/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,29 @@ fi

###

echo "DIRAC Certificates generated and available in /ca/certs"
echo "Generating Certificate Revocation List (CRL)"
if ! openssl ca -config /ca/openssl_config_ca.cnf \
-gencrl \
-out /ca/crl/ca.crl.pem; then
echo "Failed to generate CRL"
exit 1
fi

echo "Converting CRL to DER format"
if ! openssl crl -in /ca/crl/ca.crl.pem \
-outform DER \
-out /ca/crl/ca.crl.der; then
echo "Failed to convert CRL to DER format"
exit 1
fi

# Copy CRL to certs directory for easy access
cp /ca/crl/ca.crl.pem /ca/certs/ca.crl.pem
cp /ca/crl/ca.crl.der /ca/certs/ca.crl.der

###

echo "DIRAC Certificates and CRL generated and available in /ca/certs"
ls -al --color /ca/certs

if ! chmod -R o=u /ca/certs; then
Expand Down
4 changes: 4 additions & 0 deletions certificates-generation/openssl_config_ca.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,7 @@ authorityKeyIdentifier = keyid,issuer:always
keyUsage = critical, digitalSignature, keyEncipherment
# Our servers need both serverAuth and clientAuth
extendedKeyUsage = serverAuth,clientAuth

[ crl_ext ]
# Extension for CRLs (`man x509v3_config`).
authorityKeyIdentifier=keyid:always
Loading