tests: Updated NTLM tests for NTLMv2 type-3 message
[platform/upstream/curl.git] / tests / data / test89
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP GET
6 HTTP NTLM auth
7 followlocation
8 </keywords>
9 </info>
10 # Server-side
11 <reply>
12
13 <!-- no <data> in this test since we have NTLM from the start
14
15 This is supposed to be returned when the server gets a first
16 Authorization: NTLM line passed-in from the client -->
17
18 <data1001>
19 HTTP/1.1 401 Now gimme that second request of crap\r
20 Server: Microsoft-IIS/5.0\r
21 Content-Type: text/html; charset=iso-8859-1\r
22 Content-Length: 34\r
23 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
24 \r
25 This is not the real page either!
26 </data1001>
27
28 # This is supposed to be returned when the server gets the second
29 # Authorization: NTLM line passed-in from the client
30 <data1002>
31 HTTP/1.1 301 Things are fine in server land swsclose\r
32 Server: Microsoft-IIS/5.0\r
33 Connection: close\r
34 Location: /you/890010\r
35 \r
36 </data1002>
37
38 # This is the first reply after the redirection
39 <data1011>
40 HTTP/1.1 401 Now gimme that second round of crap\r
41 Server: Microsoft-IIS/5.0\r
42 Content-Type: text/html; charset=iso-8859-1\r
43 Content-Length: 34\r
44 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
45 \r
46 This is not the real page either!
47 </data1011>
48
49 # This is supposed to be returned when the server gets the second
50 # Authorization: NTLM line passed-in from the client
51 <data1012>
52 HTTP/1.1 200 Things are fine in server land swsclose\r
53 Server: Microsoft-IIS/5.0\r
54 Content-Type: text/html; charset=iso-8859-1\r
55 Content-Length: 32\r
56 \r
57 Finally, this is the real page!
58 </data1012>
59
60 <datacheck>
61 HTTP/1.1 401 Now gimme that second request of crap\r
62 Server: Microsoft-IIS/5.0\r
63 Content-Type: text/html; charset=iso-8859-1\r
64 Content-Length: 34\r
65 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
66 \r
67 HTTP/1.1 301 Things are fine in server land swsclose\r
68 Server: Microsoft-IIS/5.0\r
69 Connection: close\r
70 Location: /you/890010\r
71 \r
72 HTTP/1.1 401 Now gimme that second round of crap\r
73 Server: Microsoft-IIS/5.0\r
74 Content-Type: text/html; charset=iso-8859-1\r
75 Content-Length: 34\r
76 WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
77 \r
78 HTTP/1.1 200 Things are fine in server land swsclose\r
79 Server: Microsoft-IIS/5.0\r
80 Content-Type: text/html; charset=iso-8859-1\r
81 Content-Length: 32\r
82 \r
83 Finally, this is the real page!
84 </datacheck>
85
86 </reply>
87
88 # Client-side
89 <client>
90 <features>
91 NTLM
92 !SSPI
93 </features>
94 <server>
95 http
96 </server>
97  <name>
98 HTTP with NTLM and follow-location
99  </name>
100  <setenv>
101 # we force our own host name, in order to make the test machine independent
102 CURL_GETHOSTNAME=curlhost
103 # we try to use the LD_PRELOAD hack, if not a debug build
104 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
105  </setenv>
106  <command>
107 http://%HOSTIP:%HTTPPORT/89 -u testuser:testpass --ntlm -L
108 </command>
109 <precheck>
110 chkhostname curlhost
111 </precheck>
112 </client>
113
114 # Verify data after the test has been "shot"
115 <verify>
116 <strip>
117 ^User-Agent:.*
118 </strip>
119 <protocol>
120 GET /89 HTTP/1.1\r
121 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
122 User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
123 Host: %HOSTIP:%HTTPPORT\r
124 Accept: */*\r
125 \r
126 GET /89 HTTP/1.1\r
127 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAFuu0VIvKeMdPwjDPk7eAnwxMjM0NTY3OC1uDhL9DbZXt27JqdXMDkABAQAAAAAAAACAPtXesZ0BMTIzNDU2NzgAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==\r
128 User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3\r
129 Host: %HOSTIP:%HTTPPORT\r
130 Accept: */*\r
131 \r
132 GET /you/890010 HTTP/1.1\r
133 Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
134 User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS\r
135 Host: %HOSTIP:%HTTPPORT\r
136 Accept: */*\r
137 \r
138 GET /you/890010 HTTP/1.1\r
139 Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAAAAAAABwAAAACAAIAHAAAAAIAAgAeAAAAAAAAAAAAAAABoKBAFpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOXRlc3R1c2VyY3VybGhvc3Q=\r
140 User-Agent: curl/7.10.8-pre1 (i686-pc-linux-gnu) libcurl/7.10.8-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3 GSS\r
141 Host: %HOSTIP:%HTTPPORT\r
142 Accept: */*\r
143 \r
144 </protocol>
145 </verify>
146 </testcase>