summaryrefslogtreecommitdiff
path: root/imap/src/c-client/mail.h
diff options
context:
space:
mode:
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 */