summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-03-27 05:30:41 +0000
committerDan Winship <danw@src.gnome.org>2001-03-27 05:30:41 +0000
commit9bcfcfff2e5d9273a9fff3c13045262955c5dfdd (patch)
tree9924fdb319383d449eaf7aa334858bc8a5dde489
parent740565e800a4f4fe687ef88be9875bb7e70037b1 (diff)
downloadevolution-data-server-9bcfcfff2e5d9273a9fff3c13045262955c5dfdd.tar.gz
add an argument to say whether or not you want "PLAIN" in the list (so you
* camel-sasl.c (camel_sasl_authtype_list): add an argument to say whether or not you want "PLAIN" in the list (so you don't end up with "Password" twice in the config dialog). * providers/imap/camel-imap-provider.c (camel_provider_module_init): * providers/imap/camel-imap-store.c (query_auth_types): We don't want PLAIN. * providers/smtp/camel-smtp-provider.c (camel_provider_module_init): * providers/smtp/camel-smtp-transport.c (query_auth_types): But we do.
-rw-r--r--camel/ChangeLog14
-rw-r--r--camel/camel-sasl.c10
-rw-r--r--camel/camel-sasl.h2
-rw-r--r--camel/providers/imap/camel-imap-provider.c2
-rw-r--r--camel/providers/imap/camel-imap-store.c2
-rw-r--r--camel/providers/smtp/camel-smtp-provider.c2
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c2
7 files changed, 23 insertions, 11 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 07580c484..703e052fd 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,19 @@
2001-03-27 Dan Winship <danw@ximian.com>
+ * camel-sasl.c (camel_sasl_authtype_list): add an argument to say
+ whether or not you want "PLAIN" in the list (so you don't end up
+ with "Password" twice in the config dialog).
+
+ * providers/imap/camel-imap-provider.c (camel_provider_module_init):
+ * providers/imap/camel-imap-store.c (query_auth_types): We don't
+ want PLAIN.
+
+ * providers/smtp/camel-smtp-provider.c (camel_provider_module_init):
+ * providers/smtp/camel-smtp-transport.c (query_auth_types): But we
+ do.
+
+2001-03-27 Dan Winship <danw@ximian.com>
+
* camel-provider.h: Add an "extra_conf" field to CamelProvider
with structures and defines and stuff, for providers to specify
additional configuration options that they want. Also add a
diff --git a/camel/camel-sasl.c b/camel/camel-sasl.c
index 978104de9..f97e42480 100644
--- a/camel/camel-sasl.c
+++ b/camel/camel-sasl.c
@@ -201,25 +201,23 @@ camel_sasl_new (const char *service_name, const char *mechanism, CamelService *s
/**
* camel_sasl_authtype_list:
+ * @include_plain: whether or not to include the PLAIN mechanism
*
* Return value: a GList of SASL-supported authtypes. The caller must
* free the list, but not the contents.
**/
GList *
-camel_sasl_authtype_list (void)
+camel_sasl_authtype_list (gboolean include_plain)
{
GList *types = NULL;
- /* We don't do PLAIN here, because it's considered to be
- * normal password authentication, just behind SSL.
- */
-
types = g_list_prepend (types, &camel_sasl_cram_md5_authtype);
types = g_list_prepend (types, &camel_sasl_digest_md5_authtype);
#ifdef HAVE_KRB4
types = g_list_prepend (types, &camel_sasl_kerberos4_authtype);
#endif
- types = g_list_prepend (types, &camel_sasl_plain_authtype);
+ if (include_plain)
+ types = g_list_prepend (types, &camel_sasl_plain_authtype);
return types;
}
diff --git a/camel/camel-sasl.h b/camel/camel-sasl.h
index 02f05eb8c..55f2fb9e7 100644
--- a/camel/camel-sasl.h
+++ b/camel/camel-sasl.h
@@ -67,7 +67,7 @@ gboolean camel_sasl_authenticated (CamelSasl *sasl);
/* utility functions */
CamelSasl *camel_sasl_new (const char *service_name, const char *mechanism, CamelService *service);
-GList *camel_sasl_authtype_list (void);
+GList *camel_sasl_authtype_list (gboolean include_plain);
CamelServiceAuthType *camel_sasl_authtype (const char *mechanism);
#ifdef __cplusplus
diff --git a/camel/providers/imap/camel-imap-provider.c b/camel/providers/imap/camel-imap-provider.c
index 768c97901..ce4f30487 100644
--- a/camel/providers/imap/camel-imap-provider.c
+++ b/camel/providers/imap/camel-imap-provider.c
@@ -90,7 +90,7 @@ camel_provider_module_init (CamelSession *session)
camel_imap_store_get_type ();
imap_provider.service_cache = g_hash_table_new (imap_url_hash, imap_url_equal);
imap_provider.authtypes = g_list_concat (camel_remote_store_authtype_list (),
- camel_sasl_authtype_list ());
+ camel_sasl_authtype_list (FALSE));
imap_provider.authtypes = g_list_prepend (imap_provider.authtypes,
&camel_imap_password_authtype);
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 7f303e51f..d9466e120 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -321,7 +321,7 @@ query_auth_types (CamelService *service, CamelException *ex)
if (camel_exception_is_set (ex))
return types;
- sasl_types = camel_sasl_authtype_list ();
+ sasl_types = camel_sasl_authtype_list (FALSE);
for (t = sasl_types; t; t = next) {
authtype = t->data;
next = t->next;
diff --git a/camel/providers/smtp/camel-smtp-provider.c b/camel/providers/smtp/camel-smtp-provider.c
index bcdc1bc3e..96cba4959 100644
--- a/camel/providers/smtp/camel-smtp-provider.c
+++ b/camel/providers/smtp/camel-smtp-provider.c
@@ -51,7 +51,7 @@ camel_provider_module_init (CamelSession *session)
{
smtp_provider.object_types[CAMEL_PROVIDER_TRANSPORT] =
camel_smtp_transport_get_type ();
- smtp_provider.authtypes = camel_sasl_authtype_list ();
+ smtp_provider.authtypes = camel_sasl_authtype_list (TRUE);
smtp_provider.service_cache = g_hash_table_new (camel_url_hash, camel_url_equal);
camel_session_register_provider (session, &smtp_provider);
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 1e345e337..8b49aaa2f 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -488,7 +488,7 @@ query_auth_types (CamelService *service, CamelException *ex)
if (!smtp_connect (service, ex))
return NULL;
- types = camel_sasl_authtype_list ();
+ types = camel_sasl_authtype_list (TRUE);
for (t = types; t; t = next) {
authtype = t->data;
next = t->next;