test1310 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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=%TESTNUMBER
  67. </setenv>
  68. <command>
  69. http://%HOSTIP:%HTTPPORT/%TESTNUMBER -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. <protocol>
  78. GET /%TESTNUMBER HTTP/1.1
  79. Host: %HOSTIP:%HTTPPORT
  80. Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAA
  81. User-Agent: curl/%VERSION
  82. Accept: */*
  83. GET /%TESTNUMBER HTTP/1.1
  84. Host: %HOSTIP:%HTTPPORT
  85. Authorization: NTLM TlRMTVNTUAADAAAAGAAYAE8AAAAYABgAZwAAAAAAAABAAAAACAAIAEAAAAAHAAcASAAAAAAAAAAAAAAAggEAAHRlc3R1c2VyVU5LTk9XTlpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOQ==
  86. User-Agent: curl/%VERSION
  87. Accept: */*
  88. </protocol>
  89. </verify>
  90. # Input and output (type 1 message) for fake_ntlm
  91. <ntlm_auth_type1>
  92. <input>
  93. YR
  94. </input>
  95. <output>
  96. YR TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAwAAAA
  97. </output>
  98. </ntlm_auth_type1>
  99. # Input and output (type 3 message) for fake_ntlm
  100. <ntlm_auth_type3>
  101. <input>
  102. TT TlRMTVNTUAACAAAAAgACADAAAAAGgoEAc51AYVDgyNcAAAAAAAAAAG4AbgAyAAAAQ0MCAAQAQwBDAAEAEgBFAEwASQBTAEEAQgBFAFQASAAEABgAYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAwAsAGUAbABpAHMAYQBiAGUAdABoAC4AYwBjAC4AaQBjAGUAZABlAHYALgBuAHUAAAAAAA==
  103. </input>
  104. <output>
  105. KK TlRMTVNTUAADAAAAGAAYAE8AAAAYABgAZwAAAAAAAABAAAAACAAIAEAAAAAHAAcASAAAAAAAAAAAAAAAggEAAHRlc3R1c2VyVU5LTk9XTlpkQwKRCZFMhjj0tw47wEjKHRHlvzfxQamFcheMuv8v+xeqphEO5V41xRd7R9deOQ==
  106. </output>
  107. </ntlm_auth_type3>
  108. </testcase>