diff options
Diffstat (limited to 'camel/camel.c')
-rw-r--r-- | camel/camel.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/camel/camel.c b/camel/camel.c index 2d2272057a..5383c4d32a 100644 --- a/camel/camel.c +++ b/camel/camel.c @@ -47,3 +47,42 @@ camel_init(void) return 0; } + +#ifdef U_CANT_TOUCH_THIS +#include <ssl.h> +#include <nss.h> + +gint +camel_ssl_init (char *configdir, gboolean nss_init) +{ +#ifdef ENABLE_THREADS +#ifdef G_THREADS_ENABLED + /*g_thread_init (NULL);*/ +#else /* G_THREADS_ENABLED */ + printf ("Threads are not supported by your version of glib\n"); +#endif /* G_THREADS_ENABLED */ +#endif /* ENABLE_THREADS */ + + if (getenv ("CAMEL_VERBOSE_DEBUG")) + camel_verbose_debug = TRUE; + + unicode_init (); + + if (nss_init) { + PR_init (); + + if (NSS_init (configdir) == SECFailure) + return -1; + + /* FIXME: Erm, use appropriate policy? */ + NSS_SetDomesticPolicy (); + } + + SSL_OptionSetDefault (SSL_ENABLE_SSL2, PR_TRUE); + SSL_OptionSetDefault (SSL_ENABLE_SSL3, PR_TRUE); + SSL_OptionSetDefault (SSL_ENABLE_TLS, PR_TRUE); + SSL_OptionSetDefault (SSL_V2_COMPATIBLE_HELLO, PR_TRUE /* maybe? */); + + return 0; +} +#endif |