summaryrefslogtreecommitdiff
path: root/dkim
diff options
context:
space:
mode:
Diffstat (limited to 'dkim')
-rwxr-xr-xdkim/mkcert7
1 files changed, 7 insertions, 0 deletions
diff --git a/dkim/mkcert b/dkim/mkcert
index 74e2809..054cd14 100755
--- a/dkim/mkcert
+++ b/dkim/mkcert
@@ -22,6 +22,9 @@ rsatxt = $dir/$selector.rsa.txt
edprivkey = $dir/$selector.$ed.priv.key
edpubkey = $dir/$selector.$ed.pub.key
edtxt = $dir/$selector.$ed.txt
+dirperm = 0775
+privperm = 0660
+pubperm = 0644
files = ( $rsaprivkey $rsapubkey $rsatxt \
$edprivkey $edpubkey $edtxt )
@@ -80,6 +83,10 @@ mustsucceed as openssl pkey -outform DER -pubout -in $edprivkey | \
mustsucceed printf 'v=DKIM1;k=%s;p=%s\n' $ed `$nl{mustsucceed as cat $edpubkey} | \
mustsucceed as tee $edtxt >/dev/null
+mustsucceed as chmod $privperm $rsaprivkey $edprivkey
+mustsucceed as chmod $pubperm $rsapubkey $rsatxt $edpubkey $edtxt
+mustsucceed as chmod $dirperm $dir
+
err 'Paths generated (rsa privkey, rsa dns record, ed25519 privkey, ed25519 dns record):'
echo $rsaprivkey
echo $rsatxt