From 32a764399bed6e64b6f03578025bf4255cc63183 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 28 Feb 2003 21:55:06 +0000 Subject: Same as IMAP and POP. 2003-02-28 Jeffrey Stedfast * providers/smtp/camel-smtp-transport.c (connect_to_server): Same as IMAP and POP. * providers/imap/camel-imap-store.c (connect_to_server): Same as the POP3 code. * providers/pop3/camel-pop3-store.c (connect_to_server): Pass in appropriate flags for camel_tcp_stream_ssl_new*() functions. * camel-tcp-stream-ssl.c (enable_ssl): Not all ssl/tls streams will want to allow each of SSLv2, SSLv3 and TLSv1 so use flags to decide which to enable/disable. (camel_tcp_stream_ssl_new): Now takes a flags argument to mask out which SSL/TLS versions the stream should be compatable with. (camel_tcp_stream_ssl_new_raw): Same. svn path=/trunk/; revision=20111 --- camel/camel-tcp-stream-ssl.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'camel/camel-tcp-stream-ssl.h') diff --git a/camel/camel-tcp-stream-ssl.h b/camel/camel-tcp-stream-ssl.h index 5db4a0eb70..a2b6903aeb 100644 --- a/camel/camel-tcp-stream-ssl.h +++ b/camel/camel-tcp-stream-ssl.h @@ -38,6 +38,12 @@ extern "C" { #define CAMEL_TCP_STREAM_SSL_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_TCP_STREAM_SSL_TYPE, CamelTcpStreamSSLClass)) #define CAMEL_IS_TCP_STREAM_SSL(o) (CAMEL_CHECK_TYPE((o), CAMEL_TCP_STREAM_SSL_TYPE)) +enum { + CAMEL_TCP_STREAM_SSL_ENABLE_SSL2 = (1 << 0), + CAMEL_TCP_STREAM_SSL_ENABLE_SSL3 = (1 << 1), + CAMEL_TCP_STREAM_SSL_ENABLE_TLS = (1 << 2), +}; + struct _CamelTcpStreamSSL { CamelTcpStream parent_object; @@ -55,9 +61,9 @@ typedef struct { CamelType camel_tcp_stream_ssl_get_type (void); /* public methods */ -CamelStream *camel_tcp_stream_ssl_new (CamelService *service, const char *expected_host); +CamelStream *camel_tcp_stream_ssl_new (CamelService *service, const char *expected_host, guint32 flags); -CamelStream *camel_tcp_stream_ssl_new_raw (CamelService *service, const char *expected_host); +CamelStream *camel_tcp_stream_ssl_new_raw (CamelService *service, const char *expected_host, guint32 flags); int camel_tcp_stream_ssl_enable_ssl (CamelTcpStreamSSL *ssl); -- cgit v1.2.3