aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorSunil Shetye <shetye@bombay.retortsoft.com>2010-11-11 11:49:21 +0530
committerMatthias Andree <matthias.andree@gmx.de>2010-11-19 12:17:37 +0100
commitd1a40cf7cefbffe5ae41612f60b176ad0fc59847 (patch)
tree232220661ed63456a4cd62ed253b30b4969509e8 /imap.c
parente5fd7d15fd251658aed0853aee117c672035b1c0 (diff)
downloadfetchmail-d1a40cf7cefbffe5ae41612f60b176ad0fc59847.tar.gz
fetchmail-d1a40cf7cefbffe5ae41612f60b176ad0fc59847.tar.bz2
fetchmail-d1a40cf7cefbffe5ae41612f60b176ad0fc59847.zip
Do STARTTLS/STLS negotiation in IMAP/POP3 if it is mandatory ignoring server capabilities
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/imap.c b/imap.c
index cbaa913b..11b206c0 100644
--- a/imap.c
+++ b/imap.c
@@ -430,7 +430,8 @@ static int imap_getauth(int sock, struct query *ctl, char *greeting)
if (ctl->sslcommonname)
commonname = ctl->sslcommonname;
- if (strstr(capabilities, "STARTTLS"))
+ if (strstr(capabilities, "STARTTLS")
+ || must_tls(ctl)) /* if TLS is mandatory, ignore capabilities */
{
/* Use "tls1" rather than ctl->sslproto because tls1 is the only
* protocol that will work with STARTTLS. Don't need to worry
@@ -478,10 +479,6 @@ static int imap_getauth(int sock, struct query *ctl, char *greeting)
}
/* Usable. Proceed with authenticating insecurely. */
}
- } else if (must_tls(ctl)) {
- /* Config required TLS but STARTTLS is not advertised. */
- report(stderr, GT_("%s: cannot upgrade to TLS: no STARTTLS in CAPABILITY response.\n"), commonname);
- return PS_SOCKET;
}
}
#endif /* SSL_ENABLE */