summaryrefslogtreecommitdiff
path: root/imap/src/c-client/mail.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2013-09-21 18:45:27 -0600
committerEduardo Chappa <chappa@washington.edu>2013-09-21 18:45:27 -0600
commitc5bb25b1320af6cda4cc62ea9e15fbb03ee92026 (patch)
tree7edbf4ad7c92cac182112201293da92dff56d7bf /imap/src/c-client/mail.c
parent48e1f5018f9d324c1ebce3ea627db50fe03a2134 (diff)
downloadalpine-c5bb25b1320af6cda4cc62ea9e15fbb03ee92026.tar.xz
* Version 2.11.6
* Add /tls1, /tls1_1, /tls1_2 and /dtls1 to the definition of a server to use different ways to connect using ssl, for example {server.com/tls1} will attempt to connect to server.com at the ssl imap port (port 993) and establish a connection using TLSv1. These flags can be used in conjunction with the /ssl flag, the ssl flag is redundant. Conversely, however, the /ssl flag does not imply any of these flags; the /ssl flag means SSLv3 or, if not available, SSLv2 in the SSL port. * WebAlpine: add _GNU_SOURCE to make pubcookie build. * On my way to make 'make dist' and 'make distcheck' actually work.
Diffstat (limited to 'imap/src/c-client/mail.c')
-rw-r--r--imap/src/c-client/mail.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/imap/src/c-client/mail.c b/imap/src/c-client/mail.c
index d80a01f6..9b5526b4 100644
--- a/imap/src/c-client/mail.c
+++ b/imap/src/c-client/mail.c
@@ -814,6 +814,18 @@ long mail_valid_net_parse_work (char *name,NETMBX *mb,char *service)
mb->trysslflag = mailssldriver? T : NIL;
else if (mailssldriver && !compare_cstring (s,"ssl") && !mb->tlsflag)
mb->sslflag = mb->notlsflag = T;
+ else if (!compare_cstring(s, "tls1")
+ && !mb->tls1_1flag && !mb->tls1_2flag && !mb->dtls1flag)
+ mb->sslflag = mb->notlsflag = mb->tls1_1flag = T;
+ else if (!compare_cstring(s, "tls1_1")
+ && !mb->tls1flag && !mb->tls1_2flag && !mb->dtls1flag)
+ mb->sslflag = mb->notlsflag = mb->tls1_1flag = T;
+ else if (!compare_cstring(s, "tls1_2")
+ && !mb->tls1flag && !mb->tls1_1flag && !mb->dtls1flag)
+ mb->sslflag = mb->notlsflag = mb->tls1_2flag = T;
+ else if (!compare_cstring(s, "dtls1")
+ && !mb->tls1flag && !mb->tls1_1flag && !mb->tls1_2flag)
+ mb->sslflag = mb->notlsflag = mb->dtls1flag = T;
else if (mailssldriver && !compare_cstring (s,"novalidate-cert"))
mb->novalidate = T;
/* hack for compatibility with the past */
@@ -1222,6 +1234,9 @@ MAILSTREAM *mail_open (MAILSTREAM *stream,char *name,long options)
if (mb.tlsflag) strcat (tmp,"/tls");
if (mb.notlsflag) strcat (tmp,"/notls");
if (mb.sslflag) strcat (tmp,"/ssl");
+ if (mb.tls1_1flag) strcat (tmp,"/tls1_1");
+ if (mb.tls1_2flag) strcat (tmp,"/tls1_2");
+ if (mb.dtls1flag) strcat (tmp,"/dtls1");
if (mb.trysslflag) strcat (tmp,"/tryssl");
if (mb.novalidate) strcat (tmp,"/novalidate-cert");
strcat (tmp,"/pop3/loser}");