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 TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
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 NTLM 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 TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
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 TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
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 TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
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 TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
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 TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
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 TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
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 TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
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 TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
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 TlRMTVNTUAACAAAACAAIADAAAACGgAEAq6U1NAWaJCIAAAAAAAAAAAAAAAA4AAAATlRMTUF1dGg=
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
237SSL
238!SSPI
239</features>
240<server>
241http
242</server>
243<tool>
244libauthretry
245</tool>
246
247 <name>
248HTTP authorization retry (NTLM)
249 </name>
250 <setenv>
251# we force our own host name, in order to make the test machine independent
252CURL_GETHOSTNAME=curlhost
253# we try to use the LD_PRELOAD hack, if not a debug build
254LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
255 </setenv>
256 <command>
257http://%HOSTIP:%HTTPPORT/2031 ntlm ntlm
258</command>
259<precheck>
260chkhostname curlhost
261</precheck>
262</client>
263
264# Verify data after the test has been "shot"
265<verify>
266<protocol>
267GET /20310100 HTTP/1.1
268Host: %HOSTIP:%HTTPPORT
269Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
270Accept: */*
271
272GET /20310100 HTTP/1.1
273Host: %HOSTIP:%HTTPPORT
274Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
275Accept: */*
276
277GET /20310200 HTTP/1.1
278Host: %HOSTIP:%HTTPPORT
279Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
280Accept: */*
281
282GET /20310200 HTTP/1.1
283Host: %HOSTIP:%HTTPPORT
284Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
285Accept: */*
286
287GET /20310300 HTTP/1.1
288Host: %HOSTIP:%HTTPPORT
289Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
290Accept: */*
291
292GET /20310300 HTTP/1.1
293Host: %HOSTIP:%HTTPPORT
294Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
295Accept: */*
296
297GET /20310400 HTTP/1.1
298Host: %HOSTIP:%HTTPPORT
299Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
300Accept: */*
301
302GET /20310400 HTTP/1.1
303Host: %HOSTIP:%HTTPPORT
304Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABANgKEcT5xUUBHw5+0m4FjWTGNzg6PeHJHbaPwNwCt/tXcnIeTQCTMAg12SPDyNXMf3Rlc3R1c2VyY3VybGhvc3Q=
305Accept: */*
306
307GET /20310500 HTTP/1.1
308Host: %HOSTIP:%HTTPPORT
309Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
310Accept: */*
311
312GET /20310500 HTTP/1.1
313Host: %HOSTIP:%HTTPPORT
314Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAAhoABAI+/Fp9IERAQ74OsdNPbBpg7o8CVwLSO4DtFyIcZHUMKVktWIu92s2892OVpd2JzqnRlc3R1c2VyY3VybGhvc3Q=
315Accept: */*
316
317</protocol>
318</verify>
319</testcase>
320