Christopher R. Palmer made it possible to build libcurl with the

USE_WINDOWS_SSPI on Windows, and then libcurl will be built to use the native
way to do NTLM. SSPI also allows libcurl to pass on the current user and its
password in the request.
This commit is contained in:
Daniel Stenberg
2005-03-10 23:15:29 +00:00
parent 2ab2e7675c
commit d1d35ba85f
9 changed files with 272 additions and 15 deletions

View File

@@ -188,10 +188,30 @@ typedef enum {
NTLMSTATE_LAST
} curlntlm;
#ifdef USE_WINDOWS_SSPI
/* When including these headers, you must define either SECURITY_WIN32
* or SECURITY_KERNEL, indicating who is compiling the code.
*/
#define SECURITY_WIN32 1
#include <sspi.h>
#include <Security.h>
#include <rpc.h>
#endif
/* Struct used for NTLM challenge-response authentication */
struct ntlmdata {
curlntlm state;
#ifdef USE_WINDOWS_SSPI
CredHandle handle;
CtxtHandle c_handle;
SEC_WINNT_AUTH_IDENTITY identity;
SEC_WINNT_AUTH_IDENTITY *p_identity;
int has_handles;
void *type_2;
int n_type_2;
#else
unsigned char nonce[8];
#endif
};
#ifdef HAVE_GSSAPI