From abe164fb3990d0aa36975c8012fabec57f5b4348 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Sat, 10 Mar 2001 00:15:49 +0000 Subject: Created a new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt 2001-03-09 Jeffrey Stedfast * camel-session.c (camel_session_query_authenticator): Created a new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt to the user. This will be needed by the SSL/TLS code to come. Also changed the return value to a gpointer rather than a char* to allow the returning of TRUE/FALSE values. * camel.c: Wrap stuff with HAVE_NSS svn path=/trunk/; revision=8623 --- camel/camel.c | 47 ++++++++++------------------------------------- 1 file changed, 10 insertions(+), 37 deletions(-) (limited to 'camel/camel.c') diff --git a/camel/camel.c b/camel/camel.c index 5383c4d32a..c451045c32 100644 --- a/camel/camel.c +++ b/camel/camel.c @@ -26,40 +26,22 @@ #include #include "camel.h" #include +#ifdef HAVE_NSS +#include +#include +#include +#endif /* HAVE_NSS */ gboolean camel_verbose_debug = FALSE; gint -camel_init(void) -{ -#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 (); - - return 0; -} - -#ifdef U_CANT_TOUCH_THIS -#include -#include - -gint -camel_ssl_init (char *configdir, gboolean nss_init) +camel_init (void) { #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"); +#else /* G_THREADS_ENABLED */ + g_warning ("Threads are not supported by your version of glib\n"); #endif /* G_THREADS_ENABLED */ #endif /* ENABLE_THREADS */ @@ -68,21 +50,12 @@ camel_ssl_init (char *configdir, gboolean nss_init) unicode_init (); - if (nss_init) { - PR_init (); - - if (NSS_init (configdir) == SECFailure) - return -1; - - /* FIXME: Erm, use appropriate policy? */ - NSS_SetDomesticPolicy (); - } - +#ifdef HAVE_NSS 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 */ return 0; } -#endif -- cgit