summaryrefslogtreecommitdiffstats
path: root/certs
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2018-12-05 15:47:34 +0100
committerGuilhem Moulin <guilhem@fripost.org>2018-12-05 16:24:12 +0100
commit9722d50b9b6c5ccd81892a00bdd3023399b004fb (patch)
tree10ff7840e4c924d51217a122ac5f4a7bcb56a476 /certs
parentc21b92d9b79a80a27607618666b56fbc5cd26ac8 (diff)
DKIM: also include the "d=" tag in key filenames, not only the "s=" tag.
While the combination of "s=" tag (selector) & "d=" tag signing domain maps to a unique key, the selector alone doesn't necessarily.
Diffstat (limited to 'certs')
-rw-r--r--certs/dkim/8f00fb94ec6c37aacb48bd43e073f9b7:fripost.org.pub (renamed from certs/dkim/8f00fb94ec6c37aacb48bd43e073f9b7.pub)0
-rw-r--r--certs/dkim/9df9cdc7e101629b5003b587945afa70:x.fripost.org.pub (renamed from certs/dkim/9df9cdc7e101629b5003b587945afa70.pub)0
-rw-r--r--certs/dkim/README7
3 files changed, 4 insertions, 3 deletions
diff --git a/certs/dkim/8f00fb94ec6c37aacb48bd43e073f9b7.pub b/certs/dkim/8f00fb94ec6c37aacb48bd43e073f9b7:fripost.org.pub
index ef400f4..ef400f4 100644
--- a/certs/dkim/8f00fb94ec6c37aacb48bd43e073f9b7.pub
+++ b/certs/dkim/8f00fb94ec6c37aacb48bd43e073f9b7:fripost.org.pub
diff --git a/certs/dkim/9df9cdc7e101629b5003b587945afa70.pub b/certs/dkim/9df9cdc7e101629b5003b587945afa70:x.fripost.org.pub
index 2574f71..2574f71 100644
--- a/certs/dkim/9df9cdc7e101629b5003b587945afa70.pub
+++ b/certs/dkim/9df9cdc7e101629b5003b587945afa70:x.fripost.org.pub
diff --git a/certs/dkim/README b/certs/dkim/README
index e5addf9..2137a8d 100644
--- a/certs/dkim/README
+++ b/certs/dkim/README
@@ -1,10 +1,11 @@
-To convert a PEM-encoded public key to a TXT record, run
+To convert the PEM-encoded public keys from this directory to TXT
+records, run
$ SELECTOR="8f00fb94ec6c37aacb48bd43e073f9b7"
$ DOMAIN="fripost.org"
- $ printf "%s._domainkey%s IN TXT (\n" "$SELECTOR" "${DOMAIN:+.$DOMAIN.}"; \
+ $ printf "%s._domainkey.%s IN TXT (\n" "$SELECTOR" "$DOMAIN"; \
{ printf "v=DKIM1; k=rsa; t=s; s=email; p=";
- sed '/^--.*--$/d' <"./certs/dkim/$SELECTOR.pub" | tr -d '\n';
+ openssl pkey -pubin -in "./certs/dkim/$SELECTOR:$DOMAIN.pub" -outform DER | base64 -w0
} | fold -w64 | sed 's/.*/ "&"/; $s/$/ )\n/'
Remove the "t=s" tag if subdomaining or third-party signature (hosted