• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP proxy
7HTTP proxy NTLM auth
8HTTP Digest auth
9</keywords>
10</info>
11
12# Server-side
13<reply>
14
15# this is returned first since we get no proxy-auth
16<data>
17HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
18Proxy-Authenticate: NTLM
19
20And you should ignore this data.
21</data>
22
23# then this is returned since we get no server-auth
24<data1000>
25HTTP/1.1 200 Authorizated fine
26Content-Length: 27
27
28Welcome to the end station
29</data1000>
30
31<data1001>
32HTTP/1.1 407 NTLM type-1 received sending back type-2
33Server: Microsoft-IIS/5.0
34Content-Length: 34
35Content-Type: text/html; charset=iso-8859-1
36Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
37
38This is not the real page either!
39</data1001>
40
41# This is supposed to be returned when the server gets the second
42# Authorization: NTLM line passed-in from the client
43<data1002>
44HTTP/1.1 401 You now need to authenticate with the host
45Server: Microsoft-IIS/5.0
46WWW-Authenticate: Digest realm="r e a l m", nonce="abcdef"
47Content-Length: 46
48Content-Type: text/html; charset=iso-8859-1
49
50We have not authenticated with the server yet
51</data1002>
52
53<datacheck>
54HTTP/1.1 407 NTLM type-1 received sending back type-2
55Server: Microsoft-IIS/5.0
56Content-Length: 34
57Content-Type: text/html; charset=iso-8859-1
58Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAACGggEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
59
60HTTP/1.1 401 You now need to authenticate with the host
61Server: Microsoft-IIS/5.0
62WWW-Authenticate: Digest realm="r e a l m", nonce="abcdef"
63Content-Length: 46
64Content-Type: text/html; charset=iso-8859-1
65
66HTTP/1.1 200 Authorizated fine
67Content-Length: 27
68
69Welcome to the end station
70</datacheck>
71</reply>
72
73# Client-side
74<client>
75<server>
76http
77</server>
78<features>
79NTLM
80!SSPI
81debug
82</features>
83 <name>
84HTTP with proxy-requiring-NTLM to site-requiring-Digest
85 </name>
86 <setenv>
87# we force our own host name, in order to make the test machine independent
88CURL_GETHOSTNAME=curlhost
89# we try to use the LD_PRELOAD hack, if not a debug build
90LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
91 </setenv>
92 <command>
93http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --digest --user digest:alot
94</command>
95<precheck>
96chkhostname curlhost
97</precheck>
98</client>
99
100# Verify data after the test has been "shot"
101<verify>
102<strip>
103^User-Agent: curl/.*
104</strip>
105<protocol>
106GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
107Host: data.from.server.requiring.digest.hohoho.com
108Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
109User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
110Accept: */*
111Proxy-Connection: Keep-Alive
112
113GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
114Host: data.from.server.requiring.digest.hohoho.com
115Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoIBADQzMjE1MzIxAAAAAAAAAAAAAAAAAAAAADj3hs3u3j0kgJqCrLM+74BmaoNHDfIJjHRlc3R1c2VyY3VybGhvc3Q=
116User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
117Accept: */*
118Proxy-Connection: Keep-Alive
119
120GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
121Host: data.from.server.requiring.digest.hohoho.com
122Authorization: Digest username="digest", realm="r e a l m", nonce="abcdef", uri="/169", response="95d48591985a03c4b49cb962aa7bd3e6"
123User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
124Accept: */*
125Proxy-Connection: Keep-Alive
126
127</protocol>
128</verify>
129</testcase>
130