diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2006-11-01 23:06:04 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2006-11-01 23:06:04 +0000 |
commit | 983bd40c04cffdf4f9715ae8ba803007a5ed3640 (patch) | |
tree | 7a14196bfbdb5ba9ae36bb3fd835970c6aaac851 /pop3.c | |
parent | 78a6bed18346b084aefe9569faf7464082720df1 (diff) | |
download | fetchmail-983bd40c04cffdf4f9715ae8ba803007a5ed3640.tar.gz fetchmail-983bd40c04cffdf4f9715ae8ba803007a5ed3640.tar.bz2 fetchmail-983bd40c04cffdf4f9715ae8ba803007a5ed3640.zip |
Snapshot 6.3.6-rc1.
svn path=/branches/BRANCH_6-3/; revision=4925
Diffstat (limited to 'pop3.c')
-rw-r--r-- | pop3.c | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -303,6 +303,7 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting) #endif /* OPIE_ENABLE */ #ifdef SSL_ENABLE flag did_stls = FALSE; + flag using_tls = FALSE; #endif /* SSL_ENABLE */ #if defined(GSSAPI) @@ -432,7 +433,7 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting) (ok == PS_SOCKET && !ctl->wehaveauthed)) { ctl->server.authenticate = A_PASSWORD; - /* repoll immediately */ + /* repoll immediately with PASS authentication */ ok = PS_REPOLL; break; } @@ -462,11 +463,12 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting) return PS_REPOLL; } report(stderr, - GT_("SSL connection failed.\n")); + GT_("TLS connection failed.\n")); return PS_SOCKET; } else { if (outlevel >= O_VERBOSE && !ctl->sslproto) report(stdout, GT_("%s: opportunistic upgrade to TLS.\n"), realhost); + using_tls = TRUE; } did_stls = TRUE; @@ -482,6 +484,12 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting) */ capa_probe(sock); } + if ((ctl->sslproto && !strcasecmp(ctl->sslproto,"tls1")) && !ctl->use_ssl && !using_tls) { + report(stderr, + GT_("TLS connection failed.\n")); + return PS_SOCKET; + } + #endif /* SSL_ENABLE */ /* @@ -574,7 +582,7 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting) if (did_stls && ok == PS_SOCKET && !ctl->sslproto && !ctl->wehaveauthed) { ctl->sslproto = xstrdup(""); - /* repoll immediately */ + /* repoll immediately without TLS */ ok = PS_REPOLL; } #endif |