summaryrefslogtreecommitdiff
path: root/dkim/rmcert
diff options
context:
space:
mode:
Diffstat (limited to 'dkim/rmcert')
-rwxr-xr-xdkim/rmcert16
1 files changed, 12 insertions, 4 deletions
diff --git a/dkim/rmcert b/dkim/rmcert
index b5d2b67..33add52 100755
--- a/dkim/rmcert
+++ b/dkim/rmcert
@@ -5,10 +5,18 @@
dir = /etc/mail/dkim
user = _dkimsign
selector = $1
-privkey = $dir/$selector.priv.key
+ed = ed25519
+rsaprivkey = $dir/$selector.priv.key
pubkey = $dir/$selector.pub.key
txt = $dir/$selector.txt
+files = ( $dir/$selector.rsa.priv.key \
+ $dir/$selector.rsa.pub.key \
+ $dir/$selector.rsa.txt \
+ $dir/$selector.$ed.priv.key \
+ $dir/$selector.$ed.pub.key \
+ $dir/$selector.$ed.txt )
+
fn err {
echo $* >[1=2]
}
@@ -32,9 +40,9 @@ if (!~ $#* 1) {
exit 2
}
-removeif-e $privkey
-removeif-e $pubkey
-removeif-e $txt
+for (f in $files) {
+ removeif-e $f
+}
if (~ $removed () && ~ $failed ()) {
err no such selector: $selector