projects
/
zonemaker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f1410d
)
add script to generate TLSA records
author
Ralf Jung
<post@ralfj.de>
Fri, 29 Jan 2021 10:13:01 +0000
(11:13 +0100)
committer
Ralf Jung
<post@ralfj.de>
Fri, 29 Jan 2021 10:13:01 +0000
(11:13 +0100)
tlsa
[new file with mode: 0644]
patch
|
blob
diff --git a/tlsa
b/tlsa
new file mode 100644
(file)
index 0000000..
dd1c683
--- /dev/null
+++ b/
tlsa
@@ -0,0
+1,7
@@
+#!/bin/bash
+set -euo pipefail
+# Usage: ./tlsa <certificate filename>
+# Generates a TLSA record based on the given certificate's public key.
+
+echo -n "3 1 1 " # DANE-EE Publickey SHA256
+openssl x509 -noout -pubkey -in "$1" | openssl rsa -pubin -outform DER 2>/dev/null | sha256sum | cut -d' ' -f 1 | tr 'a-z' 'A-Z'