]> Pileus Git - ~andy/fetchmail/commitdiff
Matt Kraai's fix for POP3 STARTTLS.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 13 Sep 2002 08:00:01 +0000 (08:00 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 13 Sep 2002 08:00:01 +0000 (08:00 -0000)
svn path=/trunk/; revision=3717

pop3.c

diff --git a/pop3.c b/pop3.c
index 75b523189cdda24b9229eab2864cdaa3d4f70096..76d6c437b99228785977a290e52bad44adba109e 100644 (file)
--- 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 */
 
        /*