From 92d7dbf6cea9dc43bd55e353c9b38315791a6317 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Fri, 8 Feb 2002 01:56:45 +0000 Subject: Implementation of NTLM (aka "Secure Password Authentication") auth, taken * camel-sasl-ntlm.c: Implementation of NTLM (aka "Secure Password Authentication") auth, taken from soup. * Makefile.am (libcamel_la_SOURCES, libcamel_la_HEADERS): Add camel-sasl-ntlm. * camel-sasl.c: Add refs to camel-sasl-ntlm. * providers/imap/camel-imap-store.c (try_auth): Use imap_next_word() to skip over the "+ " of the continuation rather than just "resp + 2" since Exchange (incorrectly) returns "+" instead of "+ " for an empty continuation response. svn path=/trunk/; revision=15605 --- camel/camel-sasl.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'camel/camel-sasl.c') diff --git a/camel/camel-sasl.c b/camel/camel-sasl.c index f418c28750..1ce1286be1 100644 --- a/camel/camel-sasl.c +++ b/camel/camel-sasl.c @@ -35,6 +35,7 @@ #include "camel-sasl-login.h" #include "camel-sasl-plain.h" #include "camel-sasl-popb4smtp.h" +#include "camel-sasl-ntlm.h" #define w(x) @@ -201,6 +202,8 @@ camel_sasl_new (const char *service_name, const char *mechanism, CamelService *s sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_LOGIN_TYPE); else if (!strcmp (mechanism, "POPB4SMTP")) sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_POPB4SMTP_TYPE); + else if (!strcmp (mechanism, "NTLM")) + sasl = (CamelSasl *)camel_object_new (CAMEL_SASL_NTLM_TYPE); else return NULL; @@ -228,6 +231,7 @@ camel_sasl_authtype_list (gboolean include_plain) #ifdef HAVE_KRB4 types = g_list_prepend (types, &camel_sasl_kerberos4_authtype); #endif + types = g_list_prepend (types, &camel_sasl_ntlm_authtype); if (include_plain) types = g_list_prepend (types, &camel_sasl_plain_authtype); @@ -258,6 +262,8 @@ camel_sasl_authtype (const char *mechanism) return &camel_sasl_login_authtype; else if (!strcmp(mechanism, "POPB4SMTP")) return &camel_sasl_popb4smtp_authtype; + else if (!strcmp (mechanism, "NTLM")) + return &camel_sasl_ntlm_authtype; else return NULL; } -- cgit