aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel.c')
-rw-r--r--camel/camel.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/camel/camel.c b/camel/camel.c
index 7b250a14b1..c62656de42 100644
--- a/camel/camel.c
+++ b/camel/camel.c
@@ -41,15 +41,16 @@
gboolean camel_verbose_debug = FALSE;
-#ifdef HAVE_NSS
static void
camel_shutdown (void)
{
CamelCertDB *certdb;
+#ifdef HAVE_NSS
NSS_Shutdown ();
PR_Cleanup ();
+#endif /* HAVE_NSS */
certdb = camel_certdb_get_default ();
if (certdb) {
@@ -57,7 +58,6 @@ camel_shutdown (void)
camel_object_unref (certdb);
}
}
-#endif /* HAVE_NSS */
gint
camel_init (const char *configdir, gboolean nss_init)
@@ -75,10 +75,10 @@ camel_init (const char *configdir, gboolean nss_init)
if (getenv ("CAMEL_VERBOSE_DEBUG"))
camel_verbose_debug = TRUE;
-
+
/* initialise global camel_object_type */
camel_object_get_type();
-
+
camel_mime_utils_init();
#ifdef HAVE_NSS
@@ -95,13 +95,11 @@ camel_init (const char *configdir, gboolean nss_init)
NSS_SetDomesticPolicy ();
- g_atexit (camel_shutdown);
+ 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? */);
}
-
- 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? */);
#endif /* HAVE_NSS */
path = g_strdup_printf ("%s/camel-cert.db", configdir);
@@ -117,5 +115,7 @@ camel_init (const char *configdir, gboolean nss_init)
camel_object_unref (certdb);
+ g_atexit (camel_shutdown);
+
return 0;
}