test169 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP proxy
  7. HTTP proxy NTLM auth
  8. HTTP Digest auth
  9. </keywords>
  10. </info>
  11. # Server-side
  12. <reply>
  13. # this is returned first since we get no proxy-auth
  14. <data>
  15. HTTP/1.1 407 Authorization Required to proxy me my dear swsclose
  16. Proxy-Authenticate: NTLM
  17. And you should ignore this data.
  18. </data>
  19. # then this is returned since we get no server-auth
  20. <data1000>
  21. HTTP/1.1 200 Authorizated fine
  22. Content-Length: 27
  23. Welcome to the end station
  24. </data1000>
  25. <data1001>
  26. HTTP/1.1 407 NTLM type-1 received sending back type-2
  27. Server: Microsoft-IIS/5.0
  28. Content-Length: 34
  29. Content-Type: text/html; charset=iso-8859-1
  30. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  31. This is not the real page either!
  32. </data1001>
  33. # This is supposed to be returned when the server gets the second
  34. # Authorization: NTLM line passed-in from the client
  35. <data1002>
  36. HTTP/1.1 401 You now need to authenticate with the host
  37. Server: Microsoft-IIS/5.0
  38. WWW-Authenticate: Digest realm="r e a l m", nonce="abcdef"
  39. Content-Length: 46
  40. Content-Type: text/html; charset=iso-8859-1
  41. We have not authenticated with the server yet
  42. </data1002>
  43. <datacheck>
  44. HTTP/1.1 407 NTLM type-1 received sending back type-2
  45. Server: Microsoft-IIS/5.0
  46. Content-Length: 34
  47. Content-Type: text/html; charset=iso-8859-1
  48. Proxy-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  49. HTTP/1.1 401 You now need to authenticate with the host
  50. Server: Microsoft-IIS/5.0
  51. WWW-Authenticate: Digest realm="r e a l m", nonce="abcdef"
  52. Content-Length: 46
  53. Content-Type: text/html; charset=iso-8859-1
  54. HTTP/1.1 200 Authorizated fine
  55. Content-Length: 27
  56. Welcome to the end station
  57. </datacheck>
  58. </reply>
  59. # Client-side
  60. <client>
  61. <server>
  62. http
  63. </server>
  64. <features>
  65. NTLM
  66. !SSPI
  67. debug
  68. </features>
  69. <name>
  70. HTTP with proxy-requiring-NTLM to site-requiring-Digest
  71. </name>
  72. <setenv>
  73. # we force our own host name, in order to make the test machine independent
  74. CURL_GETHOSTNAME=curlhost
  75. # we try to use the LD_PRELOAD hack, if not a debug build
  76. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  77. </setenv>
  78. <command>
  79. http://data.from.server.requiring.digest.hohoho.com/169 --proxy http://%HOSTIP:%HTTPPORT --proxy-user testuser:testpass --proxy-ntlm --digest --user digest:alot
  80. </command>
  81. <precheck>
  82. chkhostname curlhost
  83. </precheck>
  84. </client>
  85. # Verify data after the test has been "shot"
  86. <verify>
  87. <strip>
  88. ^User-Agent: curl/.*
  89. </strip>
  90. <protocol>
  91. GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
  92. Host: data.from.server.requiring.digest.hohoho.com
  93. Proxy-Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
  94. User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
  95. Accept: */*
  96. Proxy-Connection: Keep-Alive
  97. GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
  98. Host: data.from.server.requiring.digest.hohoho.com
  99. Proxy-Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAACeAJ4AWAAAAAAAAAD2AAAACAAIAPYAAAAIAAgA/gAAAAAAAAAAAAAABoKBAMOv20GsURsat8gdH/RfnYI0MzIxNTMyMeCdd8AzFZLZ/N1ujmilmCcBAQAAAAAAAACAPtXesZ0BNDMyMTUzMjEAAAAAAgAEAEMAQwABABIARQBMAEkAUwBBAEIARQBUAEgABAAYAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAMALABlAGwAaQBzAGEAYgBlAHQAaAAuAGMAYwAuAGkAYwBlAGQAZQB2AC4AbgB1AAAAAAAAAAAAdGVzdHVzZXJjdXJsaG9zdA==
  100. User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
  101. Accept: */*
  102. Proxy-Connection: Keep-Alive
  103. GET http://data.from.server.requiring.digest.hohoho.com/169 HTTP/1.1
  104. Host: data.from.server.requiring.digest.hohoho.com
  105. Authorization: Digest username="digest", realm="r e a l m", nonce="abcdef", uri="/169", response="95d48591985a03c4b49cb962aa7bd3e6"
  106. User-Agent: curl/7.12.0-CVS (i686-pc-linux-gnu) libcurl/7.12.0-CVS OpenSSL/0.9.6b ipv6 zlib/1.1.4 GSS libidn/0.4.3
  107. Accept: */*
  108. Proxy-Connection: Keep-Alive
  109. </protocol>
  110. </verify>
  111. </testcase>