]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/commitdiff
tlsproxy-add,tlsproxy-setup: Check for invalid argument count.
authorSimon Ruderich <simon@ruderich.org>
Fri, 9 Aug 2013 16:06:17 +0000 (18:06 +0200)
committerSimon Ruderich <simon@ruderich.org>
Fri, 9 Aug 2013 16:06:17 +0000 (18:06 +0200)
src/tlsproxy-add
src/tlsproxy-setup

index c838a9a35980c5a1ff5d26ab467287d75ac29960..f7a945a85e9a919ea81ddb41d7cd3f317cdbb21d 100755 (executable)
@@ -22,7 +22,7 @@
 
 set -e
 
-if test "$#" -eq 0; then
+if test "$#" -ne 1 && test "$#" -ne 2; then
     echo "Usage: $0 <hostname> [<server-certificate>]"
     echo
     echo "Add the server certificate <server-certificate> (as .pem file) for "
index d553404eba931a749c7e4218212e7304486ab507..d76c998689454c38d004a93d304f00aa932302ee 100755 (executable)
 
 set -e
 
+
+if test "$#" -ne 0; then
+    echo "Usage: $0"
+    exit 1
+fi
+
 tempfile=`mktemp`
 trap 'rm -f "$tempfile"' EXIT