Commit a506d0aa authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

winhttp: Add support for NTLM and Negotiate authentication.

parent d63ef4d8
......@@ -552,6 +552,9 @@ static void request_destroy( object_header_t *hdr )
release_object( &request->connect->hdr );
destroy_authinfo( request->authinfo );
destroy_authinfo( request->proxy_authinfo );
heap_free( request->verb );
heap_free( request->path );
heap_free( request->version );
......
......@@ -148,6 +148,29 @@ typedef struct
BOOL is_request; /* part of request headers? */
} header_t;
enum auth_scheme
{
SCHEME_INVALID = -1,
SCHEME_BASIC,
SCHEME_NTLM,
SCHEME_PASSPORT,
SCHEME_DIGEST,
SCHEME_NEGOTIATE
};
struct authinfo
{
enum auth_scheme scheme;
CredHandle cred;
CtxtHandle ctx;
TimeStamp exp;
ULONG attr;
ULONG max_token;
char *data;
unsigned int data_len;
BOOL finished; /* finished authenticating */
};
typedef struct
{
object_header_t hdr;
......@@ -174,6 +197,8 @@ typedef struct
DWORD num_headers;
WCHAR **accept_types;
DWORD num_accept_types;
struct authinfo *authinfo;
struct authinfo *proxy_authinfo;
} request_t;
typedef struct _task_header_t task_header_t;
......@@ -252,7 +277,8 @@ BOOL set_cookies( request_t *, const WCHAR * ) DECLSPEC_HIDDEN;
BOOL add_cookie_headers( request_t * ) DECLSPEC_HIDDEN;
BOOL add_request_headers( request_t *, LPCWSTR, DWORD, DWORD ) DECLSPEC_HIDDEN;
void delete_domain( domain_t * ) DECLSPEC_HIDDEN;
BOOL set_server_for_hostname( connect_t *connect, LPCWSTR server, INTERNET_PORT port ) DECLSPEC_HIDDEN;
BOOL set_server_for_hostname( connect_t *, LPCWSTR, INTERNET_PORT ) DECLSPEC_HIDDEN;
void destroy_authinfo( struct authinfo * ) DECLSPEC_HIDDEN;
extern HRESULT WinHttpRequest_create( IUnknown *, void ** ) DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment