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