Commit 080d4632 authored by Matthias Andree's avatar Matthias Andree

fetchmail no longer reports System error during SSL_connect(): Success.

Fixes Debian Bug#928916, reported by Paul Kimoto.
parent 897ab114
......@@ -157,6 +157,8 @@ fetchmail-6.4.0 (not yet released):
* fetchmail will not try other protocols after a socket error. This avoids
mismatches of how different prococols see messages as "seen" and re-fetches
of known mail. (Fix contributed by Lauri Nurmi, GitLab Merge Request !10.)
* fetchmail no longer reports System error during SSL_connect(): Success.
Fixes Debian Bug#928916, reported by Paul Kimoto.
## UPDATED TRANSLATIONS - THANKS TO:
* CS: Petr Pisar <[email protected]> [Czech]
......
......@@ -1108,7 +1108,7 @@ static int do_session(
&ctl->remotename) == -1)
{
set_timeout(0);
report(stderr, GT_("SSL connection failed.\n"));
report(stderr, "%s: %s", ctl->sslcommonname ? ctl->sslcommonname : realhost, GT_("SSL connection failed.\n"));
err = PS_SOCKET;
goto cleanUp;
}
......
This diff is collapsed.
......@@ -1225,14 +1225,17 @@ int SSLOpen(int sock, char *mycert, char *mykey, const char *myproto, int certck
if (SSL_set_fd(_ssl_context[sock], sock) == 0
|| (ssle_connect = SSL_connect(_ssl_context[sock])) < 1) {
int e = errno;
unsigned long ssle_err_from_queue = ERR_peek_error();
unsigned long ssle_err_from_get_error = SSL_get_error(_ssl_context[sock], ssle_connect);
unsigned long ssle_err_from_queue = ERR_peek_error();
ERR_print_errors_fp(stderr);
if (SSL_ERROR_SYSCALL == ssle_err_from_get_error && 0 == ssle_err_from_queue) {
if (0 == ssle_connect) {
report(stderr, GT_("Server shut down connection prematurely during SSL_connect().\n"));
/* FIXME: the next line was hacked in 6.4.0-rc1 so the translation strings don't change.
* The %s could be merged to the inside of GT_(). */
report(stderr, "%s: %s", servercname, GT_("Server shut down connection prematurely during SSL_connect().\n"));
} else if (ssle_connect < 0) {
report(stderr, GT_("System error during SSL_connect(): %s\n"), strerror(e));
report(stderr, "%s: ", servercname);
report(stderr, GT_("System error during SSL_connect(): %s\n"), e ? strerror(e) : GT_("handshake failed at protocol or connection level."));
}
}
SSL_free( _ssl_context[sock] );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment