summaryrefslogtreecommitdiffstats
path: root/scripts/lunasa-del3.sh
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2017-07-20 08:16:14 +0200
committerEndi S. Dewata <edewata@redhat.com>2017-07-20 08:16:14 +0200
commit43f17ccffb5cec8c7b4faa6f441090db96b6eacb (patch)
tree6afa03fae3c0ace1944be9087f92c12b1f0c1fc7 /scripts/lunasa-del3.sh
parentfd5fe75b88810c3b42ae8c1daaefb821a33e6b94 (diff)
downloadpki-dev-43f17ccffb5cec8c7b4faa6f441090db96b6eacb.zip
pki-dev-43f17ccffb5cec8c7b4faa6f441090db96b6eacb.tar.gz
pki-dev-43f17ccffb5cec8c7b4faa6f441090db96b6eacb.tar.xz
Added Luna SA scripts.
Diffstat (limited to 'scripts/lunasa-del3.sh')
-rwxr-xr-xscripts/lunasa-del3.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/lunasa-del3.sh b/scripts/lunasa-del3.sh
new file mode 100755
index 0000000..39240d9
--- /dev/null
+++ b/scripts/lunasa-del3.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+password="`cat lunasa.txt`"
+
+for id in "$@"
+do
+ echo "Deleting id $id..."
+
+ /usr/safenet/lunaclient/bin/cmu list -display handle,class -id $id -password $password | while read cert
+ do
+ class=$(echo $cert | cut -d' ' -f2 | cut -d= -f2)
+ handle=$(echo $cert | cut -d' ' -f1 | cut -d= -f2)
+ echo " - $class: $handle"
+
+ /usr/safenet/lunaclient/bin/cmu delete -handle $handle -force -password $password
+ done
+done