aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/smtp
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-05-08 04:33:25 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-05-08 04:33:25 +0800
commit416d8fa6cd84e6b25886c1c2fcbf2b0dbce58b7f (patch)
treeed169f150b00a9edcd0c03ba642f166a62919d21 /camel/providers/smtp
parentfe36d75cf353522bc31362bd9b8800470fa511b3 (diff)
downloadgsoc2013-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/providers/smtp')
-rw-r--r--camel/providers/smtp/Makefile.am1
-rw-r--r--camel/providers/smtp/camel-smtp-transport.c12
2 files changed, 11 insertions, 2 deletions
diff --git a/camel/providers/smtp/Makefile.am b/camel/providers/smtp/Makefile.am
index 74597f57f5..fcc2b06f9d 100644
--- a/camel/providers/smtp/Makefile.am
+++ b/camel/providers/smtp/Makefile.am
@@ -19,6 +19,7 @@ INCLUDES = \
$(GTK_INCLUDEDIR) \
$(NSPR_CFLAGS) \
$(NSS_CFLAGS) \
+ $(OPENSSL_CFLAGS) \
-DG_LOG_DOMAIN=\"camel-smtp-provider\"
libcamelsmtp_la_SOURCES = \
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index e6f0b8cafa..2d07a26b85 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -53,6 +53,9 @@
#include "camel-tcp-stream-ssl.h"
#include <prnetdb.h>
#endif
+#ifdef HAVE_OPENSSL
+#include "camel-tcp-stream-openssl.h"
+#endif
#include "camel-session.h"
#include "camel-exception.h"
#include "camel-sasl.h"
@@ -243,16 +246,21 @@ connect_to_server (CamelService *service, CamelException *ex)
port = service->url->port ? service->url->port : SMTP_PORT;
-#ifdef HAVE_NSS
+#if defined(HAVE_NSS) || defined(HAVE_OPENSSL)
if (transport->use_ssl) {
port = service->url->port ? service->url->port : 465;
+#ifdef HAVE_NSS
+ /* use the preferred implementation - NSS */
tcp_stream = camel_tcp_stream_ssl_new (service, service->url->host);
+#else
+ 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);