Skip to content
Snippets Groups Projects
Commit cf8ec8d7 authored by phoeagon's avatar phoeagon
Browse files

fixes revoke script to remove certs first

parent b60a535c
No related branches found
No related tags found
No related merge requests found
......@@ -3,11 +3,20 @@
DBPATH=$1
CERTS=$2
echo "Resetting CA set"
RESETS=``
certutil -d sql:${DBPATH} -L | grep -oP "NSS Certificate DB:revoke-china-certs:[^\s]+" | \
while read CERT;do
certutil -d sql:${DBPATH} -D -n "${CERT}"
done
echo "Revoking CAs in $DBPATH/cert9.db"
for CERT in $CERTS;do
# p,p,p: prohibit all use
certutil -d sql:${DBPATH} -A -n "${CERT}" -t p,p,p -i ${CERT}
certutil -d sql:${DBPATH} -A -n "revoke-china-certs:${CERT}" -t p,p,p -i ${CERT}
done
echo "Done"
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