Fix HPKP processing on OS X

On Mac OS X sed requires a file extension when using in-place mode.
This commit is contained in:
Jonathon Rossi 2015-07-21 18:40:47 +10:00
parent 9ff1095f7a
commit 6876ad9250

View File

@ -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)"