--- /dev/null
+# The commands beaing read-out and run assume CWD is the test/ directory
+#
+# start collecting a command to run
+/^; TLSA_AUTOGEN$/ { active = 1; print; next; }
+#
+# keep appending to the command while there is a continuation-line marker (trailing backslash)
+active==1 && /^;/ { print;
+ if (NF > 1)
+ {
+ cmdstr = cmdstr " " substr($0, 2);
+ if (cmdstr ~ /\\$/)
+ cmdstr = substr(cmdstr, 1, length(cmdstr)-1);
+ else
+ active = 2;
+ }
+ next;
+ }
+#
+# apply the command to the next TLSA linem and go quiescent
+active==2 && /TLSA/ { cmdstr | getline cmdres;
+ if (NF == 7)
+ { printf("%s %s %s %s %s %s %s\n", $1, $2, $3, $4, $5, $6, cmdres); }
+ else
+ { printf("%s %s %s %s %s %s\n", $1, $2, $3, $4, $5, cmdres); }
+ cmdstr = "";
+ active = 0;
+ next;
+ }
+#
+# just copy other lines
+{ print; }
; full suite dns chain, sha512
;
+; TLSA_AUTOGEN
; openssl x509 -in aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.pem -noout -pubkey \
; | openssl pkey -pubin -outform DER \
; | openssl dgst -sha512 \
; A-only, sha256
;
+; TLSA_AUTOGEN
; openssl x509 -in aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.pem -noout -pubkey \
; | openssl pkey -pubin -outform DER \
; | openssl dgst -sha256 \
; full MX, sha256, TA-mode
;
+; TLSA_AUTOGEN
; openssl x509 -in aux-fixed/exim-ca/example.com/CA/CA.pem -fingerprint -sha256 -noout \
; | awk -F= '{print $2}' | tr -d : | tr '[A-F]' '[a-f]'
;
; As it happens it is also an intermediate cert in the CA-rooted chain, as this
; was initially thought to be a factor.
;
+; TLSA_AUTOGEN
; openssl x509 -in aux-fixed/exim-ca/example.com/CA/Signer.pem -noout -pubkey \
; | openssl pkey -pubin -outform DER \
; | openssl dgst -sha256 \
; a broken dane config (or under attack) where the TLSA record is correct but not DNSSEC-assured
; (record copied from dane256ee above)
+; TLSA_AUTOGEN
+; openssl x509 -in aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.pem -noout -pubkey \
+; | openssl pkey -pubin -outform DER \
+; | openssl dgst -sha256 \
+; | awk '{print $2}'
; 3 for dane-requested, 4 for dane-required
DNSSEC danebroken3 A 127.0.0.1
_1225._tcp.danebroken3 TLSA 2 0 1 9177e577d294f52da8eb206eb53e7963fb8d354bb4a1a62aa8318101dbc11e46
+; TLSA_AUTOGEN
+; openssl x509 -in aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.pem -noout -pubkey \
+; | openssl pkey -pubin -outform DER \
+; | openssl dgst -sha256 \
+; | awk '{print $2}'
DNSSEC danebroken4 A HOSTIPV4
_1225._tcp.danebroken4 TLSA 2 0 1 9177e577d294f52da8eb206eb53e7963fb8d354bb4a1a62aa8318101dbc11e46
; a broken dane config (or under attack) where the address record is correct but not DNSSEC-assured
; (TLSA record copied from dane256ee above)
; 5 for dane-requested, 6 for dane-required
+; TLSA_AUTOGEN
+; openssl x509 -in aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.pem -noout -pubkey \
+; | openssl pkey -pubin -outform DER \
+; | openssl dgst -sha256 \
+; | awk '{print $2}'
danebroken5 A 127.0.0.1
DNSSEC _1225._tcp.danebroken5 TLSA 2 0 1 9177e577d294f52da8eb206eb53e7963fb8d354bb4a1a62aa8318101dbc11e46
+; TLSA_AUTOGEN
+; openssl x509 -in aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.pem -noout -pubkey \
+; | openssl pkey -pubin -outform DER \
+; | openssl dgst -sha256 \
+; | awk '{print $2}'
danebroken6 A HOSTIPV4
DNSSEC _1225._tcp.danebroken6 TLSA 2 0 1 9177e577d294f52da8eb206eb53e7963fb8d354bb4a1a62aa8318101dbc11e46