diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-03-06 08:33:37 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-03-06 08:33:37 +0800 |
commit | bdb8a0a993163256b4e3c6d10ea9e03140c474b4 (patch) | |
tree | fb044c4e075782f3c03d73c53d57afc45050198e /camel/providers/smtp/camel-smtp-transport.h | |
parent | b1214384b6d320d9e30df70b9d220fa27d40181d (diff) | |
download | gsoc2013-evolution-bdb8a0a993163256b4e3c6d10ea9e03140c474b4.tar gsoc2013-evolution-bdb8a0a993163256b4e3c6d10ea9e03140c474b4.tar.gz gsoc2013-evolution-bdb8a0a993163256b4e3c6d10ea9e03140c474b4.tar.bz2 gsoc2013-evolution-bdb8a0a993163256b4e3c6d10ea9e03140c474b4.tar.lz gsoc2013-evolution-bdb8a0a993163256b4e3c6d10ea9e03140c474b4.tar.xz gsoc2013-evolution-bdb8a0a993163256b4e3c6d10ea9e03140c474b4.tar.zst gsoc2013-evolution-bdb8a0a993163256b4e3c6d10ea9e03140c474b4.zip |
Start the ssl stream off in non-ssl mode (useful for STARTTLS).
2002-03-05 Jeffrey Stedfast <fejj@ximian.com>
* camel-tcp-stream-openssl.c (camel_tcp_stream_openssl_new_raw):
Start the ssl stream off in non-ssl mode (useful for STARTTLS).
(camel_tcp_stream_openssl_enable_ssl): New function to toggle an
ssl stream into ssl mode.
(open_ssl_connection): Close the sockfd on fail so our caller
doesn't have to - this also allows us to save the original errno.
(stream_connect): If we want ssl mode, do our ssl stuff.
(camel_tcp_stream_openssl_class_init): Init some SSL stuff here
instead of in open_ssl_connection since these only ever need to be
called once.
(stream_read): Only use SSL_read if we are in ssl mode.
(stream_write): Only use SSL_write if we are in ssl mode.
* providers/smtp/camel-smtp-transport.c (smtp_helo): Check for the
STARTTLS extension.
(connect_to_server): Try to use STARTTLS whenever possible rather
than the old way of doing things.
(connect_to_server_wrapper): Wrapper around connect_to_server() to
first try STARTTLS and then attempt normal SSL mode if we can't
connect via STARTTLS.
* camel-tcp-stream-ssl.c (camel_tcp_stream_ssl_enable_ssl): New
function to toggle an ssl stream into ssl mode.
(camel_tcp_stream_ssl_new_raw): Start the ssl stream off in
non-ssl mode (useful for STARTTLS).
(stream_connect): Only connect in SSL mode if required.
svn path=/trunk/; revision=15937
Diffstat (limited to 'camel/providers/smtp/camel-smtp-transport.h')
-rw-r--r-- | camel/providers/smtp/camel-smtp-transport.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/camel/providers/smtp/camel-smtp-transport.h b/camel/providers/smtp/camel-smtp-transport.h index 8bba00e987..2f6ac261f4 100644 --- a/camel/providers/smtp/camel-smtp-transport.h +++ b/camel/providers/smtp/camel-smtp-transport.h @@ -47,11 +47,16 @@ extern "C" { #define CAMEL_IS_SMTP_TRANSPORT(o) (CAMEL_CHECK_TYPE((o), CAMEL_SMTP_TRANSPORT_TYPE)) -#define CAMEL_SMTP_TRANSPORT_IS_ESMTP (1 << 0) -#define CAMEL_SMTP_TRANSPORT_8BITMIME (1 << 1) -#define CAMEL_SMTP_TRANSPORT_ENHANCEDSTATUSCODES (1 << 2) +#define CAMEL_SMTP_TRANSPORT_IS_ESMTP (1 << 0) +#define CAMEL_SMTP_TRANSPORT_8BITMIME (1 << 1) +#define CAMEL_SMTP_TRANSPORT_ENHANCEDSTATUSCODES (1 << 2) +#define CAMEL_SMTP_TRANSPORT_STARTTLS (1 << 3) -#define CAMEL_SMTP_TRANSPORT_USE_SSL (1 << 3) +#define CAMEL_SMTP_TRANSPORT_USE_SSL_ALWAYS (1 << 4) +#define CAMEL_SMTP_TRANSPORT_USE_SSL_WHEN_POSSIBLE (1 << 5) + +#define CAMEL_SMTP_TRANSPORT_USE_SSL (CAMEL_SMTP_TRANSPORT_USE_SSL_ALWAYS | \ + CAMEL_SMTP_TRANSPORT_USE_SSL_WHEN_POSSIBLE) typedef struct { CamelTransport parent_object; |