From d9ca9e9869e8dd5559b36ffec608c847f154e40a Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Sat, 2 Jun 2012 11:07:58 +0100 Subject: sasl: Moved ntlm authentication message handling from smtp.c Moved the ntlm message creation and decoding from smtp.c into the sasl module to allow for use by other modules such as pop3. --- lib/curl_sasl.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'lib/curl_sasl.h') diff --git a/lib/curl_sasl.h b/lib/curl_sasl.h index dfe69ceda..43f853d77 100644 --- a/lib/curl_sasl.h +++ b/lib/curl_sasl.h @@ -45,4 +45,27 @@ CURLcode Curl_sasl_create_login_message(struct SessionHandle *data, const char* valuep, char **outptr, size_t *outlen); +#ifdef USE_NTLM +/* This is used to generate a base64 encoded NTLM type-1 message */ +CURLcode Curl_sasl_create_ntlm_type1_message(const char *userp, + const char *passwdp, + struct ntlmdata *ntlm, + char **outptr, + size_t *outlen); + +/* This is used to decode an incoming NTLM type-2 message and generate a + base64 encoded type-3 response */ +CURLcode Curl_sasl_decode_ntlm_type2_message(struct SessionHandle *data, + const char *type2msg, + const char *userp, + const char *passwdp, + struct ntlmdata *ntlm, + char **outptr, size_t *outlen); + +#endif /* USE_NTLM */ + +/* This is used to cleanup any libraries or curl modules used by the sasl + functions */ +void Curl_sasl_cleanup(struct connectdata *conn, unsigned int authused); + #endif /* HEADER_CURL_SASL_H */ -- cgit v1.2.3