From df1daac85cc5baa6ded75040b36e2b1743ac4a19 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Fri, 9 Aug 2013 18:06:17 +0200 Subject: [PATCH] tlsproxy-add,tlsproxy-setup: Check for invalid argument count. --- src/tlsproxy-add | 2 +- src/tlsproxy-setup | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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 -- 2.45.2