86 lines
1.9 KiB
Plaintext
86 lines
1.9 KiB
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
HTTP GET
|
|
HTTP Negotiate auth (stub ntlm)
|
|
</keywords>
|
|
</info>
|
|
# Server-side
|
|
<reply>
|
|
<!-- First request, expect 401 (ntlm challenge) -->
|
|
<data1>
|
|
HTTP/1.1 401 Authorization Required
|
|
Server: Microsoft-IIS/7.0
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
WWW-Authenticate: Negotiate Qw==
|
|
Content-Length: 19
|
|
|
|
Still not yet sir!
|
|
</data1>
|
|
<!-- Second request, expect success -->
|
|
<data2>
|
|
HTTP/1.1 200 Things are fine in server land
|
|
Server: Microsoft-IIS/7.0
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
WWW-Authenticate: Negotiate RA==
|
|
Content-Length: 15
|
|
|
|
Nice auth sir!
|
|
</data2>
|
|
<datacheck>
|
|
HTTP/1.1 401 Authorization Required
|
|
Server: Microsoft-IIS/7.0
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
WWW-Authenticate: Negotiate Qw==
|
|
Content-Length: 19
|
|
|
|
HTTP/1.1 200 Things are fine in server land
|
|
Server: Microsoft-IIS/7.0
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
WWW-Authenticate: Negotiate RA==
|
|
Content-Length: 15
|
|
|
|
Nice auth sir!
|
|
</datacheck>
|
|
</reply>
|
|
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<name>
|
|
HTTP Negotiate authentication (stub NTLM)
|
|
</name>
|
|
<features>
|
|
GSS-API
|
|
Debug
|
|
</features>
|
|
<setenv>
|
|
CURL_STUB_GSS_CREDS="NTLM_Alice"
|
|
</setenv>
|
|
<command>
|
|
--negotiate http://%HOSTIP:%HTTPPORT/%TESTNUMBER
|
|
</command>
|
|
</client>
|
|
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<protocol crlf="headers">
|
|
GET /%TESTNUMBER HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
Authorization: Negotiate %b64["NTLM_Alice":HTTP@127.0.0.1:2:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA]b64%
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
GET /%TESTNUMBER HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
Authorization: Negotiate %b64["NTLM_Alice":HTTP@127.0.0.1:3:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA]b64%
|
|
User-Agent: curl/%VERSION
|
|
Accept: */*
|
|
|
|
</protocol>
|
|
</verify>
|
|
</testcase>
|