diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-03-10 08:15:49 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-03-10 08:15:49 +0800 |
commit | abe164fb3990d0aa36975c8012fabec57f5b4348 (patch) | |
tree | b6a0c7a80aa022c4ae069e8e6b5adf8f027c2b63 /camel/camel.c | |
parent | b860bc0e2d14adedefc7318eeacafbf1d552e8ff (diff) | |
download | gsoc2013-evolution-abe164fb3990d0aa36975c8012fabec57f5b4348.tar.gz gsoc2013-evolution-abe164fb3990d0aa36975c8012fabec57f5b4348.tar.zst gsoc2013-evolution-abe164fb3990d0aa36975c8012fabec57f5b4348.zip |
Created a new mode (CAMEL_AUTHENTICATOR_ACCEPT) which is a Yes/No prompt
2001-03-09 Jeffrey Stedfast <fejj@ximian.com>
* 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
Diffstat (limited to 'camel/camel.c')
-rw-r--r-- | camel/camel.c | 47 |
1 files changed, 10 insertions, 37 deletions
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 <config.h> #include "camel.h" #include <unicode.h> +#ifdef HAVE_NSS +#include <mozilla/nspr.h> +#include <nss.h> +#include <ssl.h> +#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 <ssl.h> -#include <nss.h> - -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 |