From ad5e9bfd5d08b5a1c5217b3eb709dc90505abaab Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sun, 13 Mar 2016 16:02:42 +0000 Subject: vauth: Moved the Negotiate authentication code to the new vauth directory Part 1 of 2 - Moved the SSPI based Negotiate authentication code. --- lib/vauth/vauth.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'lib/vauth/vauth.h') diff --git a/lib/vauth/vauth.h b/lib/vauth/vauth.h index 7f2f48826..8a0c67765 100644 --- a/lib/vauth/vauth.h +++ b/lib/vauth/vauth.h @@ -38,6 +38,14 @@ struct ntlmdata; struct kerberos5data; #endif +#if defined(USE_WINDOWS_SSPI) && defined(USE_SPNEGO) +struct negotiatedata; +#endif + +#if defined(USE_WINDOWS_SSPI) +#define GSS_ERROR(status) (status & 0x80000000) +#endif + /* This is used to build a SPN string */ #if !defined(USE_WINDOWS_SSPI) char *Curl_auth_build_spn(const char *service, const char *instance); @@ -157,4 +165,26 @@ CURLcode Curl_auth_create_gssapi_security_message(struct SessionHandle *data, void Curl_auth_gssapi_cleanup(struct kerberos5data *krb5); #endif /* USE_KERBEROS5 */ +#if defined(USE_WINDOWS_SSPI) && defined(USE_SPNEGO) +/* This is used to decode a base64 encoded SPNEGO (Negotiate) challenge + message */ +CURLcode Curl_auth_decode_spnego_message(struct SessionHandle *data, + const char *user, + const char *passwood, + const char *service, + const char *host, + const char *chlg64, + struct negotiatedata *nego); + +/* This is used to generate a base64 encoded SPNEGO (Negotiate) response + message */ +CURLcode Curl_auth_create_spnego_message(struct SessionHandle *data, + struct negotiatedata *nego, + char **outptr, size_t *outlen); + +/* This is used to clean up the SPNEGO specifiec data */ +void Curl_auth_spnego_cleanup(struct negotiatedata* nego); + +#endif /* USE_WINDOWS_SSPI && USE_SPNEGO */ + #endif /* HEADER_CURL_VAUTH_H */ -- cgit v1.2.3