Skip to content
Snippets Groups Projects
Commit 9965f0af authored by Zoltan Mathe's avatar Zoltan Mathe
Browse files

remove CAs scripts

parent 9ea5668e
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
gsCerts=/etc/grid-security/certificates
allF="/opt/dirac/etc/grid-security/cas.pem"
copiedCAs=0
invalidCAs=0
echo "Copying CA certificates into $allF"
for cert in $gsCerts/*.0
do
ossle="openssl x509 -noout -in ${cert}"
if ${ossle} -checkend 3600; then
openssl x509 -in ${cert} >> $allF.gen
copiedCAs=`expr "${copiedCAs}" + "1"`
else
echo " - CA ${cert} is expired"
invalidCAs=`expr "${invalidCAs}" + "1"`
fi
done
echo " + There are ${invalidCAs} invalid CA certificates in $gsCerts"
echo " + Copied ${copiedCAs} CA certificates into $allF"
mv $allF.gen $allF
\ No newline at end of file
#!/bin/bash
gsCerts=/etc/grid-security/certificates
allF="/opt/dirac/etc/grid-security/allRevokedCerts.pem"
copiedCAs=0
invalidCAs=0
echo "Copying revoked certificates into $allF"
for cert in $gsCerts/*.r0
do
openssl crl -in ${cert} >> $allF.gen
copiedCAs=`expr "${copiedCAs}" + "1"`
done
echo " + Copied ${copiedCAs} revoked certificates into $allF"
mv $allF.gen $allF
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment