From bb596fc991701c32cae58abd14c1f275f8a4e8cb Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 15 Mar 2001 03:08:47 +0000 Subject: Check to see if we are using "pops" and then set the appropriate SSL 2001-03-14 Jeffrey Stedfast * providers/pop3/camel-pop3-store.c (pop3_connect): Check to see if we are using "pops" and then set the appropriate SSL settings. * providers/pop3/libcamelpop3.urls: Add "pops" * providers/pop3/camel-pop3-provider.c: Defined the pops provider. (camel_provider_module_init): Register the pops provider. svn path=/trunk/; revision=8723 --- camel/providers/pop3/camel-pop3-provider.c | 36 ++++++++++++++++++++++++++++-- camel/providers/pop3/camel-pop3-store.c | 10 ++++++++- camel/providers/pop3/libcamelpop3.urls | 1 + 3 files changed, 44 insertions(+), 3 deletions(-) (limited to 'camel/providers') diff --git a/camel/providers/pop3/camel-pop3-provider.c b/camel/providers/pop3/camel-pop3-provider.c index 5af0dad73c..e2669fc703 100644 --- a/camel/providers/pop3/camel-pop3-provider.c +++ b/camel/providers/pop3/camel-pop3-provider.c @@ -48,13 +48,45 @@ static CamelProvider pop3_provider = { NULL }; +#if defined (HAVE_NSS) || defined (HAVE_OPENSSL) +static CamelProvider pops_provider = { + "pops", + N_("Secure POP"), + + N_("For connecting to POP servers over an SSL connection. The POP " + "protocol can also be used to retrieve mail from certain web " + "mail providers and proprietary email systems."), + + "mail", + + CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE, + + CAMEL_URL_NEED_USER | CAMEL_URL_NEED_HOST | CAMEL_URL_ALLOW_AUTH, + + { 0, 0 }, + + NULL +}; +#endif + void camel_provider_module_init (CamelSession *session) { pop3_provider.object_types[CAMEL_PROVIDER_STORE] = - camel_pop3_store_get_type(); - + camel_pop3_store_get_type (); +#if defined (HAVE_NSS) || defined (HAVE_OPENSSL) + pops_provider.object_types[CAMEL_PROVIDER_STORE] = + camel_pop3_store_get_type (); +#endif + pop3_provider.service_cache = g_hash_table_new (camel_url_hash, camel_url_equal); +#if defined (HAVE_NSS) || defined (HAVE_OPENSSL) + pops_provider.service_cache = g_hash_table_new (camel_url_hash, camel_url_equal); +#endif + camel_session_register_provider (session, &pop3_provider); +#if defined (HAVE_NSS) || defined (HAVE_OPENSSL) + camel_session_register_provider (session, &pops_provider); +#endif } diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c index 5fa80b1d87..b58504dcae 100644 --- a/camel/providers/pop3/camel-pop3-store.c +++ b/camel/providers/pop3/camel-pop3-store.c @@ -459,7 +459,15 @@ pop3_connect (CamelService *service, CamelException *ex) service->url->port = KPOP_PORT; } #endif - + + if (!g_strcasecmp (service->url->protocol, "pops")) { + CamelRemoteStore *rstore = CAMEL_REMOTE_STORE (service); + + /* FIXME: what should this port be?? */ + rstore->default_port = 993; + rstore->use_ssl = TRUE; + } + res = CAMEL_SERVICE_CLASS (parent_class)->connect (service, ex); #ifdef HAVE_KRB4 diff --git a/camel/providers/pop3/libcamelpop3.urls b/camel/providers/pop3/libcamelpop3.urls index 7fffa4d861..39a0315454 100644 --- a/camel/providers/pop3/libcamelpop3.urls +++ b/camel/providers/pop3/libcamelpop3.urls @@ -1 +1,2 @@ pop +pops -- cgit v1.2.3