aboutsummaryrefslogtreecommitdiff
path: root/lib/vauth/vauth.h
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2016-03-13 16:02:42 +0000
committerSteve Holme <steve_holme@hotmail.com>2016-03-26 17:21:22 +0000
commitad5e9bfd5d08b5a1c5217b3eb709dc90505abaab (patch)
tree842a7a041a6a479efc95a9390573860ddf7ae0eb /lib/vauth/vauth.h
parent65f972b2e8f0d6ba72be1f9038f6488902e5c8aa (diff)
vauth: Moved the Negotiate authentication code to the new vauth directory
Part 1 of 2 - Moved the SSPI based Negotiate authentication code.
Diffstat (limited to 'lib/vauth/vauth.h')
-rw-r--r--lib/vauth/vauth.h30
1 files changed, 30 insertions, 0 deletions
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 */