aboutsummaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2019-08-05 23:11:43 +0200
committerMatthias Andree <matthias.andree@gmx.de>2019-08-05 23:11:43 +0200
commit080d4632298636a9a1b21c3419c059b95fb3cd37 (patch)
treee60eff748c979f02e8a256b3c828eb129cc714a4 /socket.c
parent897ab114a52bcd71b3d31e029e4c48a0136644ef (diff)
downloadfetchmail-080d4632298636a9a1b21c3419c059b95fb3cd37.tar.gz
fetchmail-080d4632298636a9a1b21c3419c059b95fb3cd37.tar.bz2
fetchmail-080d4632298636a9a1b21c3419c059b95fb3cd37.zip
fetchmail no longer reports System error during SSL_connect(): Success.
Fixes Debian Bug#928916, reported by Paul Kimoto.
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/socket.c b/socket.c
index b3eaaecc..cb93b60e 100644
--- a/socket.c
+++ b/socket.c
@@ -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] );