mirror of
https://github.com/moparisthebest/curl
synced 2024-11-17 23:15:08 -05:00
6c60355323
* Adjusted unit tests 2056, 2057 * do not generally close connections with CURLAUTH_NEGOTIATE after every request * moved negotiatedata from UrlState to connectdata * Added stream rewind logic for CURLAUTH_NEGOTIATE * introduced negotiatedata::GSS_AUTHDONE and negotiatedata::GSS_AUTHSUCC * Consider authproblem state for CURLAUTH_NEGOTIATE * Consider reuse_forbid for CURLAUTH_NEGOTIATE * moved and adjusted negotiate authentication state handling from output_auth_headers into Curl_output_negotiate * Curl_output_negotiate: ensure auth done is always set * Curl_output_negotiate: Set auth done also if result code is GSS_S_CONTINUE_NEEDED/SEC_I_CONTINUE_NEEDED as this result code may also indicate the last challenge request (only works with disabled Expect: 100-continue and CURLOPT_KEEP_SENDING_ON_ERROR -> 1) * Consider "Persistent-Auth" header, detect if not present; Reset/Cleanup negotiate after authentication if no persistent authentication * apply changes introduced with #2546 for negotiate rewind logic Fixes #1261 Closes #1975
68 lines
1.3 KiB
Plaintext
68 lines
1.3 KiB
Plaintext
<testcase>
|
|
<info>
|
|
<keywords>
|
|
HTTP
|
|
HTTP GET
|
|
HTTP Negotiate auth (stub krb5)
|
|
</keywords>
|
|
</info>
|
|
# Server-side
|
|
<reply>
|
|
<!-- First request, expect success in one shot -->
|
|
<data1>
|
|
HTTP/1.1 200 Things are fine in server land
|
|
Server: Microsoft-IIS/7.0
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
WWW-Authenticate: Negotiate RA==
|
|
Content-Length: 15
|
|
|
|
Nice auth sir!
|
|
</data1>
|
|
<datacheck>
|
|
HTTP/1.1 200 Things are fine in server land
|
|
Server: Microsoft-IIS/7.0
|
|
Content-Type: text/html; charset=iso-8859-1
|
|
WWW-Authenticate: Negotiate RA==
|
|
Content-Length: 15
|
|
|
|
Nice auth sir!
|
|
</datacheck>
|
|
</reply>
|
|
|
|
# Client-side
|
|
<client>
|
|
<server>
|
|
http
|
|
</server>
|
|
<name>
|
|
HTTP Negotiate authentication (stub krb5)
|
|
</name>
|
|
<features>
|
|
GSS-API
|
|
ld_preload
|
|
!debug
|
|
</features>
|
|
<setenv>
|
|
LD_PRELOAD=%PWD/libtest/.libs/libstubgss.so
|
|
CURL_STUB_GSS_CREDS="KRB5_Alice"
|
|
</setenv>
|
|
<command>
|
|
-u: --negotiate http://%HOSTIP:%HTTPPORT/2056
|
|
</command>
|
|
</client>
|
|
|
|
# Verify data after the test has been "shot"
|
|
<verify>
|
|
<strip>
|
|
^User-Agent:.*
|
|
</strip>
|
|
<protocol>
|
|
GET /2056 HTTP/1.1
|
|
Host: %HOSTIP:%HTTPPORT
|
|
Authorization: Negotiate IktSQjVfQWxpY2UiOkhUVFBAMTI3LjAuMC4xOjE6QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQQ==
|
|
Accept: */*
|
|
|
|
</protocol>
|
|
</verify>
|
|
</testcase>
|