From cf71d7f603f2c85f60655266fd3395e62d2f1d5c Mon Sep 17 00:00:00 2001 From: Nils Rokita <0rokita@informatik.uni-hamburg.de> Date: Sat, 28 Jan 2017 14:01:45 +0100 Subject: [PATCH] fix test syntax for sh (#1) --- hpkpinx.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hpkpinx.sh b/hpkpinx.sh index 969e933..101b2b2 100755 --- a/hpkpinx.sh +++ b/hpkpinx.sh @@ -21,7 +21,7 @@ generate_pin () ALGO='ec' fi PIN=$(openssl ${ALGO} -in ${1} -pubout 2>/dev/null | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | base64) - if [ ${PIN} == '47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=' ] + if [ ${PIN} = '47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=' ] then echo -n 'MISSING KEY!' else @@ -38,11 +38,11 @@ then exit 1 fi -if [ ${1} == "generate_pin" ] +if [ ${1} = "generate_pin" ] then generate_pin ${2} echo "" -elif [ ${1} == "deploy_cert" ] +elif [ ${1} = "deploy_cert" ] then if [ -e ${NGINX_ROOT}/hpkp.conf ] then