2007-01-22 21:25:56 -05:00
|
|
|
<testcase>
|
2007-10-11 21:44:22 -04:00
|
|
|
<info>
|
|
|
|
<keywords>
|
|
|
|
HTTP
|
|
|
|
HTTP GET
|
|
|
|
HTTP Digest auth
|
|
|
|
</keywords>
|
|
|
|
</info>
|
|
|
|
|
2004-03-31 06:51:21 -05:00
|
|
|
# Server-side
|
|
|
|
<reply>
|
|
|
|
# reply back and ask for Digest auth
|
|
|
|
<data1>
|
|
|
|
HTTP/1.1 401 Authorization Required swsclose
|
|
|
|
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
|
|
|
WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
|
|
|
|
Content-Type: text/html; charset=iso-8859-1
|
2006-11-25 08:32:04 -05:00
|
|
|
Content-Length: 26
|
2004-03-31 06:51:21 -05:00
|
|
|
|
|
|
|
This is not the real page
|
|
|
|
</data1>
|
|
|
|
|
|
|
|
# This is supposed to be returned when the server gets a
|
|
|
|
# Authorization: Digest line passed-in from the client
|
|
|
|
<data1001>
|
|
|
|
HTTP/1.1 200 OK
|
|
|
|
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
|
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
|
|
Content-Length: 23
|
|
|
|
|
|
|
|
This IS the real page!
|
|
|
|
</data1001>
|
|
|
|
|
|
|
|
#
|
|
|
|
# This is the second request, and this sends back a response saying that
|
|
|
|
# the request contained stale data. We want an update. Set swsbounce to
|
|
|
|
# bounce on to data1003 on the second request.
|
|
|
|
<data1002>
|
|
|
|
HTTP/1.1 401 Authorization re-negotiation please swsbounce
|
|
|
|
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
|
|
|
WWW-Authenticate: Digest realm="testrealm", algorithm=MD5, nonce="999999", stale=true, qop="auth"
|
|
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
|
|
Content-Length: 25
|
|
|
|
|
|
|
|
This is not the real page
|
|
|
|
</data1002>
|
|
|
|
|
|
|
|
# The second request to the 1002 section will bounce this one back instead
|
|
|
|
# thanks to the swsbounce keyword up there
|
|
|
|
<data1003>
|
|
|
|
HTTP/1.1 200 OK
|
|
|
|
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
|
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
|
|
Content-Length: 30
|
|
|
|
|
|
|
|
This IS the second real page!
|
|
|
|
</data1003>
|
|
|
|
</reply>
|
|
|
|
|
|
|
|
# Client-side
|
|
|
|
<client>
|
|
|
|
<server>
|
|
|
|
http
|
|
|
|
</server>
|
2007-03-09 18:39:42 -05:00
|
|
|
<features>
|
2014-11-06 14:57:16 -05:00
|
|
|
!SSPI
|
2007-03-09 18:39:42 -05:00
|
|
|
crypto
|
|
|
|
</features>
|
2004-03-31 06:51:21 -05:00
|
|
|
<name>
|
|
|
|
HTTP with Digest authorization with stale=true
|
|
|
|
</name>
|
|
|
|
<command>
|
2004-09-08 04:08:38 -04:00
|
|
|
http://%HOSTIP:%HTTPPORT/1530001 -u testuser:testpass --digest http://%HOSTIP:%HTTPPORT/1530002
|
2004-03-31 06:51:21 -05:00
|
|
|
</command>
|
2005-01-25 16:45:03 -05:00
|
|
|
</client>
|
2004-03-31 06:51:21 -05:00
|
|
|
|
|
|
|
# Verify data after the test has been "shot"
|
|
|
|
<verify>
|
|
|
|
<strip>
|
2004-04-29 09:24:50 -04:00
|
|
|
^Authorization.*cnonce
|
2004-03-31 06:51:21 -05:00
|
|
|
^User-Agent:.*
|
|
|
|
</strip>
|
|
|
|
<protocol>
|
|
|
|
GET /1530001 HTTP/1.1
|
2007-09-14 15:32:31 -04:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2004-03-31 06:51:21 -05:00
|
|
|
Accept: */*
|
|
|
|
|
|
|
|
GET /1530001 HTTP/1.1
|
2015-03-11 19:50:46 -04:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2004-03-31 06:51:21 -05:00
|
|
|
Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1530001", response="f4f83139396995bac665f24a1f1055c7"
|
|
|
|
User-Agent: curl/7.10.5 (i686-pc-linux-gnu) libcurl/7.10.5 OpenSSL/0.9.7a ipv6 zlib/1.1.3
|
|
|
|
Accept: */*
|
|
|
|
|
|
|
|
GET /1530002 HTTP/1.1
|
2015-03-11 19:50:46 -04:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2004-03-31 06:51:21 -05:00
|
|
|
Authorization: Digest username="testuser", realm="testrealm", nonce="1053604145", uri="/1530002", response="f84511b014fdd0ba6494f42871079c32"
|
|
|
|
User-Agent: curl/7.11.0-CVS (i686-pc-linux-gnu) libcurl/7.11.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS
|
|
|
|
Accept: */*
|
|
|
|
|
|
|
|
GET /1530002 HTTP/1.1
|
2015-03-11 19:50:46 -04:00
|
|
|
Host: %HOSTIP:%HTTPPORT
|
2004-04-29 06:47:13 -04:00
|
|
|
Authorization: Digest username="testuser", realm="testrealm", nonce="999999", uri="/1530002", cnonce="MTA4MzIy", nc="00000001", qop="auth", response="25291c357671604a16c0242f56721c07", algorithm="MD5"
|
2004-03-31 06:51:21 -05:00
|
|
|
User-Agent: curl/7.11.0-CVS (i686-pc-linux-gnu) libcurl/7.11.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS
|
|
|
|
Accept: */*
|
|
|
|
|
|
|
|
</protocol>
|
|
|
|
<stdout>
|
|
|
|
HTTP/1.1 401 Authorization Required swsclose
|
|
|
|
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
|
|
|
WWW-Authenticate: Digest realm="testrealm", nonce="1053604145"
|
|
|
|
Content-Type: text/html; charset=iso-8859-1
|
2006-11-25 08:32:04 -05:00
|
|
|
Content-Length: 26
|
2004-03-31 06:51:21 -05:00
|
|
|
|
|
|
|
HTTP/1.1 200 OK
|
|
|
|
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
|
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
|
|
Content-Length: 23
|
|
|
|
|
|
|
|
This IS the real page!
|
|
|
|
HTTP/1.1 401 Authorization re-negotiation please swsbounce
|
|
|
|
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
|
|
|
WWW-Authenticate: Digest realm="testrealm", algorithm=MD5, nonce="999999", stale=true, qop="auth"
|
|
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
|
|
Content-Length: 25
|
|
|
|
|
|
|
|
HTTP/1.1 200 OK
|
|
|
|
Server: Apache/1.3.27 (Darwin) PHP/4.1.2
|
|
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
|
|
Content-Length: 30
|
|
|
|
|
|
|
|
This IS the second real page!
|
|
|
|
</stdout>
|
|
|
|
</verify>
|
2007-01-22 21:25:56 -05:00
|
|
|
</testcase>
|