diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-05-08 04:33:25 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-05-08 04:33:25 +0800 |
commit | 416d8fa6cd84e6b25886c1c2fcbf2b0dbce58b7f (patch) | |
tree | ed169f150b00a9edcd0c03ba642f166a62919d21 /camel/camel-remote-store.c | |
parent | fe36d75cf353522bc31362bd9b8800470fa511b3 (diff) | |
download | gsoc2013-evolution-416d8fa6cd84e6b25886c1c2fcbf2b0dbce58b7f.tar.gz gsoc2013-evolution-416d8fa6cd84e6b25886c1c2fcbf2b0dbce58b7f.tar.zst gsoc2013-evolution-416d8fa6cd84e6b25886c1c2fcbf2b0dbce58b7f.zip |
Add support for using OpenSSL.
2001-05-04 Jeffrey Stedfast <fejj@ximian.com>
* providers/smtp/camel-smtp-transport.c (connect_to_server): Add
support for using OpenSSL.
* camel-remote-store.c (remote_connect): Add support for using the
OpenSSL implementation.
* camel-tcp-stream-ssl.c (ssl_bad_cert): Hmmmm, don't pass in a
NULL as the last argument to alert_user - prototype doesn't take
that argument anymore?
* camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_finalize):
(ssl_verify): Use a global hash table to try and lookup the
CamelTcpStreamOpenSSL object given the ssl context since OpenSSL
doesn't think one needs to pass data around, we should all be
living in a world of global variables, duh!
svn path=/trunk/; revision=9697
Diffstat (limited to 'camel/camel-remote-store.c')
-rw-r--r-- | camel/camel-remote-store.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/camel/camel-remote-store.c b/camel/camel-remote-store.c index a0f142e889..767a0fbe51 100644 --- a/camel/camel-remote-store.c +++ b/camel/camel-remote-store.c @@ -46,10 +46,15 @@ #include "camel-stream-buffer.h" #include "camel-tcp-stream.h" #include "camel-tcp-stream-raw.h" -#if HAVE_NSS + +#ifdef HAVE_NSS #include "camel-tcp-stream-ssl.h" #endif +#ifdef HAVE_OPENSSL +#include "camel-tcp-stream-openssl.h" +#endif + #include "camel-url.h" #include "string-utils.h" @@ -223,14 +228,21 @@ remote_connect (CamelService *service, CamelException *ex) else port = store->default_port; +#if defined(HAVE_NSS) || defined(HAVE_OPENSSL) + if (store->use_ssl) { #ifdef HAVE_NSS - if (store->use_ssl) + /* this is the preferred SSL implementation */ tcp_stream = camel_tcp_stream_ssl_new (service, service->url->host); - else +#else + /* use openssl... */ + tcp_stream = camel_tcp_stream_openssl_new (service, service->url->host); +#endif /* HAVE_NSS */ + } else { tcp_stream = camel_tcp_stream_raw_new (); + } #else tcp_stream = camel_tcp_stream_raw_new (); -#endif /* HAVE_NSS */ +#endif /* HAVE_NSS || HAVE_OPENSSL */ ret = camel_tcp_stream_connect (CAMEL_TCP_STREAM (tcp_stream), h, port); camel_free_host(h); |