From 6876ad92500a5ef49b11db991e91ab575d0569dd Mon Sep 17 00:00:00 2001 From: Jonathon Rossi Date: Tue, 21 Jul 2015 18:40:47 +1000 Subject: [PATCH] Fix HPKP processing on OS X On Mac OS X sed requires a file extension when using in-place mode. --- testssl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testssl.sh b/testssl.sh index d39b7e3..ff5e5bc 100755 --- a/testssl.sh +++ b/testssl.sh @@ -710,7 +710,7 @@ hpkp() { preload "$TMPFILE" # get the key fingerprints - sed -i -e 's/Public-Key-Pins://g' -e s'/Public-Key-Pins-Report-Only://' $TMPFILE + sed -i '' -e 's/Public-Key-Pins://' -e 's/Public-Key-Pins-Report-Only://' $TMPFILE [ -s "$HOSTCERT" ] || get_host_cert hpkp_key_hostcert="$($OPENSSL x509 -in $HOSTCERT -pubkey -noout | grep -v PUBLIC | \ $OPENSSL base64 -d | $OPENSSL dgst -sha256 -binary | $OPENSSL base64)"