curl-library
Re: Wrong Digest Authentication header when using Windows SSPI
Date: Thu, 23 Apr 2015 18:14:02 +0300
On 23.04.2015 17:54, Daniel Stenberg wrote:
> On Thu, 23 Apr 2015, LRN wrote:
>
>> Yes, it does (does not apply to 7.42.0 cleanly though, had to tweak it).
>
> Nice, can you post an updated version of the patch for us to consider to
> merge?
>
> I mostly lack a review and a +1 from someone who knows something about Windows
> and SSPI, but a "works for me" goes pretty far too.
>
The attached patch applies to 7.42.0 cleanly.
The only hunk that needed to change was the one that adds #include "rawstr.h"
Even without this hunk the code compiles, albeit with warnings (implicit
declarations of raw string functions).
Even with this hunk i still get *some* warnings:
../../curl-7.42.0/lib/curl_sasl_sspi.c:291:10: warning: no previous prototype
for 'Curl_override_sspi_http_realm' [-Wmissing-prototypes]
CURLcode Curl_override_sspi_http_realm (const char *chlg,
^
../../curl-7.42.0/lib/curl_sasl_sspi.c: In function
'Curl_sasl_create_digest_http_message':
../../curl-7.42.0/lib/curl_sasl_sspi.c:448:39: warning: pointer targets in
passing argument 1 of 'Curl_override_sspi_http_realm' differ in signedness
[-Wpointer-sign]
if (Curl_override_sspi_http_realm(digest->input_token, &identity))
^
../../curl-7.42.0/lib/curl_sasl_sspi.c:291:10: note: expected 'const char *'
but argument is of type 'BYTE *'
CURLcode Curl_override_sspi_http_realm (const char *chlg,
^
Both should be easy to fix (provide a prototype just before the function to
placate gcc; cast the argument as 'const char*')
-- O< ascii ribbon - stop html email! - www.asciiribbon.org
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- text/plain attachment: 0003-a69b2a723dcd03cdf74a836b77abc9e9b59bd907.all.patch
- application/pgp-keys attachment: 0x922360B0.asc
- application/pgp-signature attachment: OpenPGP digital signature