Commit Graph

12 Commits

Author SHA1 Message Date
Isaac Boukris 0b11660234
gssapi: fix memory leak of output token in multi round context
When multiple rounds are needed to establish a security context
(usually ntlm), we overwrite old token with a new one without free.
Found by proposed gss tests using stub a gss implementation (by
valgrind error), though I have confirmed the leak with a real
gssapi implementation as well.

Closes https://github.com/curl/curl/pull/1733
2017-08-05 00:23:24 +02:00
Steve Holme a0f212946b vauth: Introduced Curl_auth_is_<mechansism>_supported() functions
As Windows SSPI authentication calls fail when a particular mechanism
isn't available, introduced these functions for DIGEST, NTLM, Kerberos 5
and Negotiate to allow both HTTP and SASL authentication the opportunity
to query support for a supported mechanism before selecting it.

For now each function returns TRUE to maintain compatability with the
existing code when called.
2016-08-18 20:31:20 +01:00
Steve Holme 25bf71ab07 spnego: Corrected miss-placed * in Curl_auth_spnego_cleanup() declaration
Typo introduced in commit ad5e9bfd5d.
2016-07-23 21:29:16 +01:00
Daniel Stenberg 434f8d0389 internals: rename the SessionHandle struct to Curl_easy 2016-06-22 10:28:41 +02:00
Viktor Szakats a24f71aac4 URLs: change http to https in many places
Closes #754
2016-04-06 11:58:34 +02:00
Steve Holme cbc52ff341 vauth: Corrected a number of typos in comments
Reported-by: Michael Osipov
2016-04-06 00:21:07 +01:00
Steve Holme 9feb2676a4 vauth: Removed the need for a separate GSS-API based SPN function 2016-04-03 20:26:03 +01:00
Steve Holme 7a7cdf264d spnego: Small code tidy up
* Prefer dereference of string pointer rather than strlen()
* Free challenge pointer in one place
* Additional comments
2016-04-03 17:32:10 +01:00
Steve Holme 2aaa63b555 spnego: Renamed the context's SPN variable
To be consistent with the Kerberos 5 context and other authentication
code.
2016-04-02 06:41:29 +01:00
Steve Holme 5bdb4c13c2 spnego: Corrected some typos in comments
Corrected typos from commit ad5e9bfd5d and 6d6f9ca1d9.
2016-04-01 19:07:49 +01:00
Isaac Boukris d5fc6e14b0 GSS: make Curl_gss_log_error more verbose
Also display the GSS_C_GSS_CODE (major code) when specified instead of
only GSS_C_MECH_CODE (minor code).

In addition, the old code was printing a colon twice after the prefix
and also miscalculated the length of the buffer in between calls to
gss_display_status (the length of ": " was missing).

Also, gss_buffer is not guaranteed to be NULL terminated and thus need
to restrict reading by its length.

Closes #738
2016-03-29 16:51:29 +02:00
Steve Holme 6d6f9ca1d9 vauth: Moved the Negotiate authentication code to the new vauth directory
Part 2 of 2 - Moved the GSS-API based Negotiate authentication code.
2016-03-26 17:21:22 +00:00