]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Updated NTLM/Negotiate test clients, explaining a bit of their use.
authorhno <>
Tue, 8 May 2007 05:37:47 +0000 (05:37 +0000)
committerhno <>
Tue, 8 May 2007 05:37:47 +0000 (05:37 +0000)
Added a trivial Basic auth test helper.

test-suite/basic_test.sh [new file with mode: 0755]
test-suite/run_negotiate_test.sh
test-suite/run_ntlm_test.sh

diff --git a/test-suite/basic_test.sh b/test-suite/basic_test.sh
new file mode 100755 (executable)
index 0000000..02947eb
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+while read user password; do
+case $password in
+UNKNOWN)
+       echo "ERR Unknown User"
+       ;;
+OK*)   echo "OK"
+       ;;
+*)     echo "ERR Incorrect Login"
+       ;;
+esac
+done
index 1867084764c853e2caf18377ec81077ce248be34..8e846bea2e0a4aac0b6fc9a07471ad59c780c603 100644 (file)
@@ -1,6 +1,20 @@
 #!/bin/sh
+url=$1
+proxy=${2:-localhost}
+port=${3:-3128}
+
+if [ $# -lt 1 ]; then
+    echo "Usage: $0 URL [server port]"
+    exit 1
+fi
+
+echo "blob             # partial message"
+echo "USER=...         # Success"
+echo "BAD..            # Login failure"
+echo "ERR..            # Failure"
+
 while read auth; do
-       echo "HEAD http://www.squid-cache.org/ HTTP/1.0"
+       echo "GET $url HTTP/1.0"
        if [ -n "$auth" ]; then
                echo "Proxy-Authorization: Negotiate $auth"
        fi
index 4b7212b124f01f7c9bc1aaa3fea3bc091d5b69e6..14a263cc4df69bd1b3f31f0c3eaebc334a41ecbf 100644 (file)
@@ -1,9 +1,23 @@
 #!/bin/sh
+url=$1
+proxy=${2:-localhost}
+port=${3:-3128}
+
+if [ $# -lt 1 ]; then
+    echo "Usage: $0 URL [server port]"
+    exit 1
+fi
+
+echo "blob             # partial message"
+echo "USER=...         # Success"
+echo "BAD..            # Login failure"
+echo "ERR..            # Failure"
+
 while read auth; do
-       echo "HEAD http://www.squid-cache.org/ HTTP/1.0"
+       echo "GET $url HTTP/1.0"
        if [ -n "$auth" ]; then
                echo "Proxy-Authorization: NTLM $auth"
        fi
        echo "Proxy-Connection: keep-alive"
        echo
-done | tee -a /dev/fd/2 | nc localhost 3128
+done | tee -a /dev/fd/2 | nc $proxy $port