From 8f7b01f131c5012baf4dba6dd524b38ce8c71aa7 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 13 Sep 2002 08:00:01 +0000 Subject: Matt Kraai's fix for POP3 STARTTLS. svn path=/trunk/; revision=3717 --- pop3.c | 30 ++++++++++++------------------ 1 file 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 */ /* -- cgit v1.2.3