tests: Updated NTLM tests for NTLMv2 type-3 message
[platform/upstream/curl.git] / tests / data / test548
1 <testcase>
2 <info>
3 <keywords>
4 HTTP
5 HTTP POST
6 HTTP proxy
7 HTTP proxy NTLM auth
8 </keywords>
9 </info>
10
11 # Server-side
12 <reply>
13
14 <data>
15 HTTP/1.1 407 Authorization Required swsclose\r
16 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
17 Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"\r
18 Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"\r
19 Proxy-Authenticate: NTLM\r
20 Content-Type: text/html; charset=iso-8859-1\r
21 Connection: close\r
22 \r
23 This is not the real page
24 </data>
25
26 # this is returned first since we get no proxy-auth
27 <data1001>
28 HTTP/1.1 407 Authorization Required to proxy me my dear\r
29 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
30 Content-Length: 34\r
31 \r
32 Hey you, authenticate or go away!
33 </data1001>
34
35 # This is supposed to be returned when the server gets the second
36 # Authorization: NTLM line passed-in from the client
37 <data1002>
38 HTTP/1.1 200 Things are fine in proxy land swsclose\r
39 Server: Microsoft-IIS/5.0\r
40 Content-Type: text/html; charset=iso-8859-1\r
41 Content-Length: 42\r
42 \r
43 Contents of that page you requested, sir.
44 </data1002>
45
46 <datacheck>
47 HTTP/1.1 407 Authorization Required swsclose\r
48 Server: Apache/1.3.27 (Darwin) PHP/4.1.2\r
49 Proxy-Authenticate: Blackmagic realm="gimme all yer s3cr3ts"\r
50 Proxy-Authenticate: Basic realm="gimme all yer s3cr3ts"\r
51 Proxy-Authenticate: NTLM\r
52 Content-Type: text/html; charset=iso-8859-1\r
53 Connection: close\r
54 \r
55 HTTP/1.1 407 Authorization Required to proxy me my dear\r
56 Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==\r
57 Content-Length: 34\r
58 \r
59 HTTP/1.1 200 Things are fine in proxy land swsclose\r
60 Server: Microsoft-IIS/5.0\r
61 Content-Type: text/html; charset=iso-8859-1\r
62 Content-Length: 42\r
63 \r
64 Contents of that page you requested, sir.
65 </datacheck>
66 </reply>
67
68 # Client-side
69 <client>
70 <server>
71 http
72 </server>
73 # tool to use
74 <tool>
75 lib548
76 </tool>
77 <features>
78 NTLM
79 !SSPI
80 </features>
81  <name>
82 HTTP proxy auth NTLM with POST data from CURLOPT_POSTFIELDS
83  </name>
84  <setenv>
85 # we force our own host name, in order to make the test machine independent
86 CURL_GETHOSTNAME=curlhost
87 # we try to use the LD_PRELOAD hack, if not a debug build
88 LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
89  </setenv>
90  <command>
91 http://test.remote.example.com/path/548 http://%HOSTIP:%HTTPPORT testuser:testpass
92 </command>
93 <precheck>
94 chkhostname curlhost
95 </precheck>
96 </client>
97
98 # Verify data after the test has been "shot"
99 <verify>
100 <strip>
101 ^User-Agent: curl/.*
102 </strip>
103 <protocol>
104 POST http://test.remote.example.com/path/548 HTTP/1.1\r
105 User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
106 Host: test.remote.example.com\r
107 Accept: */*\r
108 Proxy-Connection: Keep-Alive\r
109 Content-Length: 36\r
110 Content-Type: application/x-www-form-urlencoded\r
111 \r
112 this is the blurb we want to upload
113 POST http://test.remote.example.com/path/548 HTTP/1.1\r
114 Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=\r
115 User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
116 Host: test.remote.example.com\r
117 Accept: */*\r
118 Proxy-Connection: Keep-Alive\r
119 Content-Length: 0\r
120 Content-Type: application/x-www-form-urlencoded\r
121 \r
122 POST http://test.remote.example.com/path/548 HTTP/1.1\r
123 Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAFuu0VIvKeMdPwjDPk7eAnwxMjM0NTY3OC1uDhL9DbZXt27JqdXMDkABAQAAAAAAAACAPtXesZ0BMTIzNDU2NzgAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==\r
124 User-Agent: curl/7.13.2-CVS (i686-pc-linux-gnu) libcurl/7.13.2-CVS OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13\r
125 Host: test.remote.example.com\r
126 Accept: */*\r
127 Proxy-Connection: Keep-Alive\r
128 Content-Length: 36\r
129 Content-Type: application/x-www-form-urlencoded\r
130 \r
131 this is the blurb we want to upload
132 </protocol>
133 </verify>
134 </testcase>