diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2002-03-09 04:17:15 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2002-03-09 04:17:15 +0000 |
commit | 59600d8b6d22683c2b5cd79ee7bfe31596d038b2 (patch) | |
tree | dabac9d0732e3ef5eccf1f64d1c9175b4379de2b | |
parent | 018f610b96ae9d39e95452beb6639afbd6d9c8a3 (diff) | |
download | fetchmail-59600d8b6d22683c2b5cd79ee7bfe31596d038b2.tar.gz fetchmail-59600d8b6d22683c2b5cd79ee7bfe31596d038b2.tar.bz2 fetchmail-59600d8b6d22683c2b5cd79ee7bfe31596d038b2.zip |
Minor fixes.
svn path=/trunk/; revision=3584
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | pop3.c | 28 | ||||
-rw-r--r-- | rcfile_y.y | 2 | ||||
-rw-r--r-- | sink.c | 3 | ||||
-rw-r--r-- | socket.c | 4 |
5 files changed, 38 insertions, 3 deletions
@@ -2,6 +2,10 @@ (The `lines' figures total .c, .h, .l, and .y files under version control.) +* Renamed misnamed tr.po and da.po files +* Jakub Ulanowski's patch to fix SSL fingerprint handling. +* Matt Kraai's patch for supporting STLS over POP3. + fetchmail-5.9.8 (Thu Feb 14 23:47:31 EST 2002), 21358 lines: * Added de translation catalog; updated da and tr catalogs. @@ -141,6 +141,9 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting) #ifdef OPIE_ENABLE flag has_otp = FALSE; #endif /* OPIE_ENABLE */ +#ifdef SSL_ENABLE + flag has_ssl = FALSE; +#endif /* SSL_ENABLE */ #ifdef SDPS_ENABLE /* @@ -207,6 +210,10 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting) { if (DOTLINE(buffer)) break; +#ifdef SSL_ENABLE + if (strstr(buffer, "STLS")) + has_ssl = TRUE; +#endif /* SSL_ENABLE */ #if defined(GSSAPI) if (strstr(buffer, "GSSAPI")) has_gssapi = TRUE; @@ -224,6 +231,27 @@ static int pop3_getauth(int sock, struct query *ctl, char *greeting) } } +#ifdef SSL_ENABLE + if (has_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); + } + } +#endif /* SSL_ENABLE */ + /* * OK, we have an authentication type now. */ @@ -368,7 +368,7 @@ user_option : TO localnames HERE #ifdef SSL_ENABLE current.use_ssl = FLAG_FALSE; #else - yyerror(GT_("SSL is not enabled")) + yyerror(GT_("SSL is not enabled")); #endif } @@ -1029,8 +1029,11 @@ int open_sink(struct query *ctl, struct msgblk *msg, /* * User was delivering locally. We have a fallback MDA. * Latch it in place, logging the error, and fall through. + * Set stripcr as we would if MDA had been the initial transport */ ctl->mda = FALLBACK_MDA; + if (!ctl->forcecr) + ctl->stripcr = TRUE; report(stderr, GT_("can't raise the listener; falling back to %s"), FALLBACK_MDA); @@ -807,10 +807,10 @@ int SSL_verify_callback( int ok_return, X509_STORE_CTX *ctx, int strict ) if (outlevel > O_SILENT) report(stdout, GT_("%s key fingerprint: %s\n"), _server_label, text); if (_check_digest != NULL) { - if (strcmp(text, _check_digest) == 0) + if (strcmp(text, _check_digest) == 0) { if (outlevel > O_SILENT) report(stdout, GT_("%s fingerprints match.\n"), _server_label); - else { + } else { if (outlevel > O_SILENT) report(stderr, GT_("%s fingerprints do not match!\n"), _server_label); return (0); |