test1310 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <testcase>
  2. <info>
  3. <keywords>
  4. HTTP
  5. HTTP GET
  6. HTTP NTLM auth
  7. </keywords>
  8. </info>
  9. # Server-side
  10. <reply>
  11. <!-- no <data> in this test since we have NTLM from the start
  12. This is supposed to be returned when the server gets a first
  13. Authorization: NTLM line passed-in from the client -->
  14. <data1001>
  15. HTTP/1.1 401 Now gimme that second request of crap
  16. Server: Microsoft-IIS/5.0
  17. Content-Type: text/html; charset=iso-8859-1
  18. Content-Length: 34
  19. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  20. This is not the real page either!
  21. </data1001>
  22. # This is supposed to be returned when the server gets the second
  23. # Authorization: NTLM line passed-in from the client
  24. <data1002>
  25. HTTP/1.1 200 Things are fine in server land swsclose
  26. Server: Microsoft-IIS/5.0
  27. Content-Type: text/html; charset=iso-8859-1
  28. Content-Length: 32
  29. Finally, this is the real page!
  30. </data1002>
  31. <datacheck>
  32. HTTP/1.1 401 Now gimme that second request of crap
  33. Server: Microsoft-IIS/5.0
  34. Content-Type: text/html; charset=iso-8859-1
  35. Content-Length: 34
  36. WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  37. HTTP/1.1 200 Things are fine in server land swsclose
  38. Server: Microsoft-IIS/5.0
  39. Content-Type: text/html; charset=iso-8859-1
  40. Content-Length: 32
  41. Finally, this is the real page!
  42. </datacheck>
  43. </reply>
  44. # Client-side
  45. <client>
  46. <features>
  47. NTLM_WB
  48. debug
  49. </features>
  50. <server>
  51. http
  52. </server>
  53. <name>
  54. HTTP with NTLM delegation to winbind helper
  55. </name>
  56. <setenv>
  57. # we force our own host name, in order to make the test machine independent
  58. CURL_GETHOSTNAME=curlhost
  59. # we try to use the LD_PRELOAD hack, if not a debug build
  60. LD_PRELOAD=%PWD/libtest/.libs/libhostname.so
  61. # set path to fake_auth instead of real ntlm_auth to generate NTLM type1 and type 3 messages
  62. CURL_NTLM_WB_FILE=%PWD/server/fake_ntlm
  63. # set source directory so fake_ntlm can find the test files
  64. CURL_NTLM_AUTH_SRCDIR=%SRCDIR
  65. # set the test number
  66. CURL_NTLM_AUTH_TESTNUM=1310
  67. </setenv>
  68. <command>
  69. http://%HOSTIP:%HTTPPORT/1310 -u testuser:anypasswd --ntlm-wb
  70. </command>
  71. <precheck>
  72. chkhostname curlhost
  73. </precheck>
  74. </client>
  75. # Verify data after the test has been "shot"
  76. <verify>
  77. <strip>
  78. ^User-Agent:.*
  79. </strip>
  80. <protocol>
  81. GET /1310 HTTP/1.1
  82. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAA
  83. User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  84. Host: %HOSTIP:%HTTPPORT
  85. Accept: */*
  86. GET /1310 HTTP/1.1
  87. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAE8AAAAYABgAZwAAAAAAAABAAAAACAAIAEAAAAAHAAcASAAAAAAAAAAAAAAAggEAAHRlc3R1c2VyVU5LTk9XTlpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOQ==
  88. User-Agent: curl/7.10.6-pre1 (i686-pc-linux-gnu) libcurl/7.10.6-pre1 OpenSSL/0.9.7a ipv6 zlib/1.1.3
  89. Host: %HOSTIP:%HTTPPORT
  90. Accept: */*
  91. </protocol>
  92. </verify>
  93. # Input and output (type 1 message) for fake_ntlm
  94. <ntlm_auth_type1>
  95. <input>
  96. YR
  97. </input>
  98. <output>
  99. YR TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAA
  100. </output>
  101. </ntlm_auth_type1>
  102. # Input and output (type 3 message) for fake_ntlm
  103. <ntlm_auth_type3>
  104. <input>
  105. TT TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  106. </input>
  107. <output>
  108. KK TlRMTVNTUAADAAAAGAAYAE8AAAAYABgAZwAAAAAAAABAAAAACAAIAEAAAAAHAAcASAAAAAAAAAAAAAAAggEAAHRlc3R1c2VyVU5LTk9XTlpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOQ==
  109. </output>
  110. </ntlm_auth_type3>
  111. </testcase>