summaryrefslogtreecommitdiff
path: root/imap/src/c-client/mail.h
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.h
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.h')
-rw-r--r--imap/src/c-client/mail.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/imap/src/c-client/mail.h b/imap/src/c-client/mail.h
index 174993e1..2c3f92d2 100644
--- a/imap/src/c-client/mail.h
+++ b/imap/src/c-client/mail.h
@@ -428,6 +428,14 @@
#define NET_TLSCLIENT ((unsigned long) 0x10000000)
/* try SSL mode */
#define NET_TRYSSL ((unsigned long) 0x8000000)
+ /* try TLS1 mode */
+#define NET_TRYTLS1 ((unsigned long) 0x1000000)
+ /* try TLS1_1 mode */
+#define NET_TRYTLS1_1 ((unsigned long) 0x2000000)
+ /* try TLS1_2 mode */
+#define NET_TRYTLS1_2 ((unsigned long) 0x4000000)
+ /* try DTLS1 mode */
+#define NET_TRYDTLS1 ((unsigned long) 0x8000000)
/* Close options */
@@ -654,6 +662,10 @@ typedef struct net_mailbox {
unsigned int dbgflag : 1; /* debug flag */
unsigned int secflag : 1; /* secure flag */
unsigned int sslflag : 1; /* SSL driver flag */
+ unsigned int tls1flag : 1; /* Use TLSv1 */
+ unsigned int tls1_1flag : 1; /* Use TLSv1.1 */
+ unsigned int tls1_2flag : 1; /* Use TLSV1.2 */
+ unsigned int dtls1flag : 1; /* Use DTLSv1 */
unsigned int trysslflag : 1; /* try SSL driver first flag */
unsigned int novalidate : 1; /* don't validate certificates */
unsigned int tlsflag : 1; /* TLS flag */
@@ -663,6 +675,14 @@ typedef struct net_mailbox {
unsigned int loser : 1; /* server is a loser */
unsigned int tlssslv23 : 1; /* force SSLv23 client method over TLS */
} NETMBX;
+
+#define SSL_METHOD(M) ((M).tlssslv23 ? NIL \
+ : (M).tls1flag ? NET_TRYTLS1 \
+ : (M).tls1_1flag ? NET_TRYTLS1_1 \
+ : (M).tls1_2flag ? NET_TRYTLS1_2 \
+ : (M).dtls1flag ? NET_TRYDTLS1 \
+ : NET_TLSCLIENT)
+
/* Item in an address list */