2011-07-18 17:39:52 -04:00
<testcase>
<info>
<keywords>
HTTP
HTTP GET
HTTP NTLM auth
</keywords>
</info>
# Server-side
<reply>
<!-- no <data> in this test since we have NTLM from the start
This is supposed to be returned when the server gets a first
Authorization: NTLM line passed-in from the client -->
<data1001>
HTTP/1.1 401 Now gimme that second request of crap
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
Content-Length: 34
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
This is not the real page either!
</data1001>
# This is supposed to be returned when the server gets the second
# Authorization: NTLM line passed-in from the client
<data1002>
HTTP/1.1 200 Things are fine in server land swsclose
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
Content-Length: 32
Finally, this is the real page!
</data1002>
<datacheck>
HTTP/1.1 401 Now gimme that second request of crap
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
Content-Length: 34
WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
HTTP/1.1 200 Things are fine in server land swsclose
Server: Microsoft-IIS/5.0
Content-Type: text/html; charset=iso-8859-1
Content-Length: 32
Finally, this is the real page!
</datacheck>
</reply>
# Client-side
<client>
<features>
2011-08-26 19:32:49 -04:00
NTLM_WB
2011-07-19 17:50:34 -04:00
debug
2011-07-18 17:39:52 -04:00
</features>
<server>
http
</server>
<name>
2011-08-27 00:31:18 -04:00
HTTP with NTLM delegation to winbind helper
2011-07-18 17:39:52 -04:00
</name>
<setenv>
# we force our own host name, in order to make the test machine independent
CURL_GETHOSTNAME=curlhost
# we try to use the LD_PRELOAD hack, if not a debug build
LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
# set path to fake_auth instead of real ntlm_auth to generate NTLM type1 and type 3 messages
2011-08-27 00:31:18 -04:00
CURL_NTLM_WB_FILE=%PWD/server/fake_ntlm
2011-07-26 15:47:04 -04:00
# set source directory so fake_ntlm can find the test files
2011-07-31 14:44:41 -04:00
CURL_NTLM_AUTH_SRCDIR=%SRCDIR
2011-07-26 15:47:04 -04:00
# set the test number
2011-07-31 14:44:41 -04:00
CURL_NTLM_AUTH_TESTNUM=1310
2011-07-18 17:39:52 -04:00
</setenv>
<command>
2011-08-26 19:32:49 -04:00
http://%HOSTIP:%HTTPPORT/1310 -u testuser:anypasswd --ntlm-wb
2011-07-18 17:39:52 -04:00
</command>
<precheck>
chkhostname curlhost
</precheck>
</client>
# Verify data after the test has been "shot"
<verify>
<protocol>
2011-07-29 12:32:32 -04:00
GET /1310 HTTP/1.1
2015-03-11 19:50:46 -04:00
Host: %HOSTIP:%HTTPPORT
2011-07-18 17:39:52 -04:00
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAA
2020-10-02 07:45:24 -04:00
User-Agent: curl/%VERSION
2011-07-18 17:39:52 -04:00
Accept: */*
2011-07-29 12:32:32 -04:00
GET /1310 HTTP/1.1
2015-03-11 19:50:46 -04:00
Host: %HOSTIP:%HTTPPORT
2011-07-18 17:39:52 -04:00
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAE8AAAAYABgAZwAAAAAAAABAAAAACAAIAEAAAAAHAAcASAAAAAAAAAAAAAAAggEAAHRlc3R1c2VyVU5LTk9XTlpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOQ==
2020-10-02 07:45:24 -04:00
User-Agent: curl/%VERSION
2011-07-18 17:39:52 -04:00
Accept: */*
</protocol>
</verify>
# Input and output (type 1 message) for fake_ntlm
<ntlm_auth_type1>
<input>
YR
</input>
<output>
YR TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAA
</output>
</ntlm_auth_type1>
# Input and output (type 3 message) for fake_ntlm
<ntlm_auth_type3>
<input>
TT TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
</input>
<output>
KK TlRMTVNTUAADAAAAGAAYAE8AAAAYABgAZwAAAAAAAABAAAAACAAIAEAAAAAHAAcASAAAAAAAAAAAAAAAggEAAHRlc3R1c2VyVU5LTk9XTlpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOQ==
</output>
</ntlm_auth_type3>
</testcase>