]> git.ipfire.org Git - thirdparty/squid.git/blob - test-suite/ntlm_test.sh
Source Format Enforcement (#532)
[thirdparty/squid.git] / test-suite / ntlm_test.sh
1 #!/bin/sh
2 #
3 ## Copyright (C) 1996-2020 The Squid Software Foundation and contributors
4 ##
5 ## Squid software is distributed under GPLv2+ license and includes
6 ## contributions from numerous individuals and organizations.
7 ## Please see the COPYING and CONTRIBUTORS files for details.
8 ##
9
10 while read request; do
11 case $request in
12 *SLEEP=*)
13 sleep `echo $request | sed -e 's/.*SLEEP=\([^;]*\).*/\1/'`
14 request=`echo $request | sed -e 's/SLEEP=[^;]*;*//'`
15 ;;
16 esac
17 data="`echo $request | cut -c4-`"
18 blob="$$.$data-$challenge.`date +%s`"
19 case $request in
20
21 ??" USER="*)
22 echo "AF `echo $request|cut -d= -f2-`"
23 ;;
24
25 ??" BAD"*)
26 echo "BH `echo $request|cut -c7-`"
27 ;;
28
29 ??" ERR"*)
30 echo "NA `echo $request|cut -c7-`"
31 ;;
32
33 "YR"*)
34 challenge="$data.`date +%s`"
35 echo "TT Challenge-$$.$challenge"
36 ;;
37
38 "KK"*)
39 echo "TT Negotiate-$$.$data-$challenge.`date +%s`"
40 ;;
41 *)
42 echo "BH Invalid request"
43 ;;
44 esac
45 done