aboutsummaryrefslogtreecommitdiffstats
path: root/pop3.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2002-09-13 08:00:01 +0000
committerEric S. Raymond <esr@thyrsus.com>2002-09-13 08:00:01 +0000
commit8f7b01f131c5012baf4dba6dd524b38ce8c71aa7 (patch)
treefb5c9c2d5802dd3451410049d0679170d0a898ad /pop3.c
parent1a415db70b4269c89a6f023f2903ba4bdce997a6 (diff)
downloadfetchmail-8f7b01f131c5012baf4dba6dd524b38ce8c71aa7.tar.gz
fetchmail-8f7b01f131c5012baf4dba6dd524b38ce8c71aa7.tar.bz2
fetchmail-8f7b01f131c5012baf4dba6dd524b38ce8c71aa7.zip
Matt Kraai's fix for POP3 STARTTLS.
svn path=/trunk/; revision=3717
Diffstat (limited to 'pop3.c')
-rw-r--r--pop3.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/pop3.c b/pop3.c
index 75b52318..76d6c437 100644
--- a/pop3.c
+++ b/pop3.c
@@ -247,24 +247,18 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting)
}
#ifdef SSL_ENABLE
- if (has_ssl && !ctl->use_ssl &&
-#if INET6_ENABLE
- ctl->server.service && (strcmp(ctl->server.service, "pop3s"))
-#else /* INET6_ENABLE */
- ctl->server.port != 995
-#endif /* INET6_ENABLE */
- )
- {
- char *realhost;
-
- realhost = ctl->server.via ? ctl->server.via : ctl->server.pollname; gen_transact(sock, "STLS");
- if (SSLOpen(sock,ctl->sslcert,ctl->sslkey,ctl->sslproto,ctl->sslcertck, ctl->sslcertpath,ctl->sslfingerprint,realhost,ctl->server.pollname) == -1)
- {
- report(stderr,
- GT_("SSL connection failed.\n"));
- return(PS_AUTHFAIL);
- }
- }
+ if (has_ssl && !ctl->use_ssl)
+ {
+ char *realhost;
+
+ realhost = ctl->server.via ? ctl->server.via : ctl->server.pollname; gen_transact(sock, "STLS");
+ if (SSLOpen(sock,ctl->sslcert,ctl->sslkey,ctl->sslproto,ctl->sslcertck, ctl->sslcertpath,ctl->sslfingerprint,realhost,ctl->server.pollname) == -1)
+ {
+ report(stderr,
+ GT_("SSL connection failed.\n"));
+ return(PS_AUTHFAIL);
+ }
+ }
#endif /* SSL_ENABLE */
/*