From: Simon Ruderich Date: Fri, 9 Aug 2013 16:06:17 +0000 (+0200) Subject: tlsproxy-add,tlsproxy-setup: Check for invalid argument count. X-Git-Url: https://ruderich.org/simon/gitweb/?p=tlsproxy%2Ftlsproxy.git;a=commitdiff_plain;h=df1daac85cc5baa6ded75040b36e2b1743ac4a19 tlsproxy-add,tlsproxy-setup: Check for invalid argument count. --- diff --git a/src/tlsproxy-add b/src/tlsproxy-add index c838a9a..f7a945a 100755 --- a/src/tlsproxy-add +++ b/src/tlsproxy-add @@ -22,7 +22,7 @@ set -e -if test "$#" -eq 0; then +if test "$#" -ne 1 && test "$#" -ne 2; then echo "Usage: $0 []" echo echo "Add the server certificate (as .pem file) for " diff --git a/src/tlsproxy-setup b/src/tlsproxy-setup index d553404..d76c998 100755 --- a/src/tlsproxy-setup +++ b/src/tlsproxy-setup @@ -22,6 +22,12 @@ set -e + +if test "$#" -ne 0; then + echo "Usage: $0" + exit 1 +fi + tempfile=`mktemp` trap 'rm -f "$tempfile"' EXIT