aboutsummaryrefslogtreecommitdiffstats
path: root/pop3.c
diff options
context:
space:
mode:
Diffstat (limited to 'pop3.c')
-rw-r--r--pop3.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/pop3.c b/pop3.c
index fd5b1304..e32103d7 100644
--- a/pop3.c
+++ b/pop3.c
@@ -449,21 +449,25 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting)
ok = gen_transact(sock, "STLS");
/* We use "tls1" instead of ctl->sslproto, as we want STLS,
- * not other SSL protocols
- */
+ * not other SSL protocols */
if (ok == PS_SUCCESS &&
- SSLOpen(sock,ctl->sslcert,ctl->sslkey,"tls1",ctl->sslcertck, ctl->sslcertpath,ctl->sslfingerprint,realhost,ctl->server.pollname) == -1)
+ SSLOpen(sock,ctl->sslcert,ctl->sslkey,"tls1",ctl->sslcertck,
+ ctl->sslcertpath,ctl->sslfingerprint,
+ realhost,ctl->server.pollname) == -1)
{
if (!ctl->sslproto && !ctl->wehaveauthed)
{
ctl->sslproto = xstrdup("");
- /* repoll immediately */
- return(PS_REPOLL);
+ /* repoll immediately without TLS */
+ return PS_REPOLL;
}
report(stderr,
GT_("SSL connection failed.\n"));
- return PS_SOCKET;
- }
+ return PS_SOCKET;
+ } else {
+ if (outlevel >= O_VERBOSE && !ctl->sslproto)
+ report(stdout, GT_("%s: opportunistic upgrade to TLS.\n"), realhost);
+ }
did_stls = TRUE;
/*