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/server/sws.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tests/server/sws.c') diff --git a/tests/server/sws.c b/tests/server/sws.c index 993fefcf7..821497068 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -763,7 +763,20 @@ static int ProcessRequest(struct httprequest *req) logmsg("Authorization header found, as required"); } - if(!req->digest && strstr(req->reqbuf, "Authorization: Digest")) { + if(strstr(req->reqbuf, "Authorization: Negotiate")) { + /* Negotiate iterations */ + static long prev_testno = -1; + static long prev_partno = -1; + logmsg("Negotiate: prev_testno: %d, prev_partno: %d", + prev_testno, prev_partno); + if(req->testno != prev_testno) { + prev_testno = req->testno; + prev_partno = req->partno; + } + prev_partno += 1; + req->partno = prev_partno; + } + else if(!req->digest && strstr(req->reqbuf, "Authorization: Digest")) { /* If the client is passing this Digest-header, we set the part number to 1000. Not only to spice up the complexity of this, but to make Digest stuff to work in the test suite. */ -- cgit v1.2.3