From 56d949d31ad182a22bd3bad25b1a902b635d549d Mon Sep 17 00:00:00 2001 From: Isaac Boukris Date: Tue, 18 Jul 2017 21:46:21 +0300 Subject: tests: add initial gssapi test using stub implementation The stub implementation is pre-loaded using LD_PRELOAD and emulates common gssapi uses (only builds if curl is initially built with gssapi support). The initial tests are currently disabled for debug builds as LD_PRELOAD is not used then. Ref: https://github.com/curl/curl/pull/1687 --- tests/data/test2056 | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 tests/data/test2056 (limited to 'tests/data/test2056') diff --git a/tests/data/test2056 b/tests/data/test2056 new file mode 100644 index 000000000..f00e21204 --- /dev/null +++ b/tests/data/test2056 @@ -0,0 +1,87 @@ + + + +HTTP +HTTP GET +HTTP Negotiate auth (stub krb5) + + +# Server-side + + + +HTTP/1.1 401 Authorization Required +Server: Microsoft-IIS/7.0 +Content-Type: text/html; charset=iso-8859-1 +WWW-Authenticate: Negotiate +Content-Length: 13 + +Not yet sir! + + + +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! + + +HTTP/1.1 401 Authorization Required +Server: Microsoft-IIS/7.0 +Content-Type: text/html; charset=iso-8859-1 +WWW-Authenticate: Negotiate +Content-Length: 13 + +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! + + + +# Client-side + + +http + + +HTTP Negotiate authentication (stub krb5) + + +GSS-API +ld_preload +!debug + + +LD_PRELOAD=%PWD/libtest/.libs/libstubgss.so +CURL_STUB_GSS_CREDS="KRB5_Alice" + + +-u: --negotiate http://%HOSTIP:%HTTPPORT/2056 + + + +# Verify data after the test has been "shot" + + +^User-Agent:.* + + +GET /2056 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Accept: */* + +GET /2056 HTTP/1.1 +Host: %HOSTIP:%HTTPPORT +Authorization: Negotiate IktSQjVfQWxpY2UiOkhUVFBAMTI3LjAuMC4xOjE6QUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQQ== +Accept: */* + + + + -- cgit v1.2.3