1<testcase>
2<info>
3<keywords>
4HTTP
5HTTP GET
6HTTP NTLM auth
7</keywords>
8</info>
9# Server-side
10<reply>
11
12<!-- First request has NTLM auth, wrong password -->
13<data100>
14HTTP/1.1 401 Need NTLM auth
15Server: Microsoft-IIS/5.0
16Content-Type: text/html; charset=iso-8859-1
17Content-Length: 27
18WWW-Authenticate: NTLM
19
20This is not the real page!
21</data100>
22
23<data1101>
24HTTP/1.1 401 NTLM intermediate
25Server: Microsoft-IIS/5.0
26Content-Type: text/html; charset=iso-8859-1
27Content-Length: 33
28WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
29
30This is still not the real page!
31</data1101>
32
33<data1102>
34HTTP/1.1 401 Sorry wrong password
35Server: Microsoft-IIS/5.0
36Content-Type: text/html; charset=iso-8859-1
37Content-Length: 29
38WWW-Authenticate: NTLM
39
40This is a bad password page!
41</data1102>
42
43<!-- Second request has NTML auth, right password -->
44<data200>
45HTTP/1.1 401 Need NTLM auth (2)
46Server: Microsoft-IIS/5.0
47Content-Type: text/html; charset=iso-8859-1
48Content-Length: 27
49WWW-Authenticate: NTLM
50
51This is not the real page!
52</data200>
53
54<data1201>
55HTTP/1.1 401 NTLM intermediate (2)
56Server: Microsoft-IIS/5.0
57Content-Type: text/html; charset=iso-8859-1
58Content-Length: 33
59WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
60
61This is still not the real page!
62</data1201>
63
64<data1202>
65HTTP/1.1 200 Things are fine in server land
66Server: Microsoft-IIS/5.0
67Content-Type: text/html; charset=iso-8859-1
68Content-Length: 32
69
70Finally, this is the real page!
71</data1202>
72
73<!-- Third request has NTLM auth, wrong password -->
74<data300>
75HTTP/1.1 401 Need NTLM auth (3)
76Server: Microsoft-IIS/5.0
77Content-Type: text/html; charset=iso-8859-1
78Content-Length: 27
79WWW-Authenticate: NTLM
80
81This is not the real page!
82</data300>
83
84<data1301>
85HTTP/1.1 401 NTLM intermediate (3)
86Server: Microsoft-IIS/5.0
87Content-Type: text/html; charset=iso-8859-1
88Content-Length: 33
89WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
90
91This is still not the real page!
92</data1301>
93
94<data1302>
95HTTP/1.1 401 Sorry wrong password (2)
96Server: Microsoft-IIS/5.0
97Content-Type: text/html; charset=iso-8859-1
98Content-Length: 29
99WWW-Authenticate: NTLM
100
101This is a bad password page!
102</data1302>
103
104<!-- Fourth request has NTLM auth, wrong password -->
105<data400>
106HTTP/1.1 401 Need NTLM auth (4)
107Server: Microsoft-IIS/5.0
108Content-Type: text/html; charset=iso-8859-1
109Content-Length: 27
110WWW-Authenticate: NTLM
111
112This is not the real page!
113</data400>
114
115<data1401>
116HTTP/1.1 401 NTLM intermediate (4)
117Server: Microsoft-IIS/5.0
118Content-Type: text/html; charset=iso-8859-1
119Content-Length: 33
120WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
121
122This is still not the real page!
123</data1401>
124
125<data1402>
126HTTP/1.1 401 Sorry wrong password (3)
127Server: Microsoft-IIS/5.0
128Content-Type: text/html; charset=iso-8859-1
129Content-Length: 29
130WWW-Authenticate: NTLM
131
132This is a bad password page!
133</data1402>
134
135<!-- Fifth request has NTLM auth, right password -->
136<data500>
137HTTP/1.1 401 Need NTLM auth (5)
138Server: Microsoft-IIS/5.0
139Content-Type: text/html; charset=iso-8859-1
140Content-Length: 27
141WWW-Authenticate: NTLM
142
143This is not the real page!
144</data500>
145
146<data1501>
147HTTP/1.1 401 NTLM intermediate (5)
148Server: Microsoft-IIS/5.0
149Content-Type: text/html; charset=iso-8859-1
150Content-Length: 33
151WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
152
153This is still not the real page!
154</data1501>
155
156<data1502>
157HTTP/1.1 200 Things are fine in server land (2)
158Server: Microsoft-IIS/5.0
159Content-Type: text/html; charset=iso-8859-1
160Content-Length: 32
161
162Finally, this is the real page!
163</data1502>
164
165<datacheck>
166HTTP/1.1 401 NTLM intermediate
167Server: Microsoft-IIS/5.0
168Content-Type: text/html; charset=iso-8859-1
169Content-Length: 33
170WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
171
172HTTP/1.1 401 Sorry wrong password
173Server: Microsoft-IIS/5.0
174Content-Type: text/html; charset=iso-8859-1
175Content-Length: 29
176WWW-Authenticate: NTLM
177
178This is a bad password page!
179HTTP/1.1 401 NTLM intermediate (2)
180Server: Microsoft-IIS/5.0
181Content-Type: text/html; charset=iso-8859-1
182Content-Length: 33
183WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
184
185HTTP/1.1 200 Things are fine in server land
186Server: Microsoft-IIS/5.0
187Content-Type: text/html; charset=iso-8859-1
188Content-Length: 32
189
190Finally, this is the real page!
191HTTP/1.1 401 NTLM intermediate (3)
192Server: Microsoft-IIS/5.0
193Content-Type: text/html; charset=iso-8859-1
194Content-Length: 33
195WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
196
197HTTP/1.1 401 Sorry wrong password (2)
198Server: Microsoft-IIS/5.0
199Content-Type: text/html; charset=iso-8859-1
200Content-Length: 29
201WWW-Authenticate: NTLM
202
203This is a bad password page!
204HTTP/1.1 401 NTLM intermediate (4)
205Server: Microsoft-IIS/5.0
206Content-Type: text/html; charset=iso-8859-1
207Content-Length: 33
208WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
209
210HTTP/1.1 401 Sorry wrong password (3)
211Server: Microsoft-IIS/5.0
212Content-Type: text/html; charset=iso-8859-1
213Content-Length: 29
214WWW-Authenticate: NTLM
215
216This is a bad password page!
217HTTP/1.1 401 NTLM intermediate (5)
218Server: Microsoft-IIS/5.0
219Content-Type: text/html; charset=iso-8859-1
220Content-Length: 33
221WWW-Authenticate: NTLM TlRMTVNTUAACAAAACAAIADAAAAAGggEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
222
223HTTP/1.1 200 Things are fine in server land (2)
224Server: Microsoft-IIS/5.0
225Content-Type: text/html; charset=iso-8859-1
226Content-Length: 32
227
228Finally, this is the real page!
229</datacheck>
230
231</reply>
232
233# Client-side
234<client>
235<features>
236NTLM
237!SSPI
238</features>
239<server>
240http
241</server>
242<tool>
243libauthretry
244</tool>
245
246 <name>
247HTTP authorization retry (NTLM)
248 </name>
249 <setenv>
250# we force our own host name, in order to make the test machine independent
251CURL_GETHOSTNAME=curlhost
252# we try to use the LD_PRELOAD hack, if not a debug build
253LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
254 </setenv>
255 <command>
256http://%HOSTIP:%HTTPPORT/2031 ntlm ntlm
257</command>
258<precheck>
259chkhostname curlhost
260</precheck>
261</client>
262
263# Verify data after the test has been "shot"
264<verify>
265<strip>
266^User-Agent:.*
267</strip>
268<protocol>
269GET /20310100 HTTP/1.1
270Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
271Host: %HOSTIP:%HTTPPORT
272Accept: */*
273
274GET /20310100 HTTP/1.1
275Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
276Host: %HOSTIP:%HTTPPORT
277Accept: */*
278
279GET /20310200 HTTP/1.1
280Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
281Host: %HOSTIP:%HTTPPORT
282Accept: */*
283
284GET /20310200 HTTP/1.1
285Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
286Host: %HOSTIP:%HTTPPORT
287Accept: */*
288
289GET /20310300 HTTP/1.1
290Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
291Host: %HOSTIP:%HTTPPORT
292Accept: */*
293
294GET /20310300 HTTP/1.1
295Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
296Host: %HOSTIP:%HTTPPORT
297Accept: */*
298
299GET /20310400 HTTP/1.1
300Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
301Host: %HOSTIP:%HTTPPORT
302Accept: */*
303
304GET /20310400 HTTP/1.1
305Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
306Host: %HOSTIP:%HTTPPORT
307Accept: */*
308
309GET /20310500 HTTP/1.1
310Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
311Host: %HOSTIP:%HTTPPORT
312Accept: */*
313
314GET /20310500 HTTP/1.1
315Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoIBAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
316Host: %HOSTIP:%HTTPPORT
317Accept: */*
318
319</protocol>
320</verify>
321</testcase>
322