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 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
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 TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
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
81</features>
82 <name>
83HTTP with proxy-requiring-NTLM to site-requiring-Digest
84 </name>
85 <setenv>
86# we force our own host name, in order to make the test machine independent
87CURL_GETHOSTNAME=curlhost
88# we try to use the LD_PRELOAD hack, if not a debug build
89LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
90 </setenv>
91 <command>
92http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --digest --user digest:alot
93</command>
94<precheck>
95chkhostname curlhost
96</precheck>
97</client>
98
99# Verify data after the test has been "shot"
100<verify>
101<strip>
102^User-Agent: curl/.*
103</strip>
104<protocol>
105GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
106Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
107User-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
108Host: data.from.server.requiring.digest.hohoho.com
109Accept: */*
110Proxy-Connection: Keep-Alive
111
112GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
113Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAFuu0VIvKeMdPwjDPk7eAnwxMjM0NTY3OC1uDhL9DbZXt27JqdXMDkABAQAAAAAAAACAPtXesZ0BMTIzNDU2NzgAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
114User-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
115Host: data.from.server.requiring.digest.hohoho.com
116Accept: */*
117Proxy-Connection: Keep-Alive
118
119GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
120Authorization: Digest username="digest", realm="r e a l m", nonce="abcdef", uri="/169", response="95d48591985a03c4b49cb962aa7bd3e6"
121User-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
122Host: data.from.server.requiring.digest.hohoho.com
123Accept: */*
124Proxy-Connection: Keep-Alive
125
126</protocol>
127</verify>
128</testcase>
129