From: Thomas Roessler Date: Mon, 22 Jan 2001 11:04:56 +0000 (+0000) Subject: patch-1.3.13.tk.ssl.connect.1 X-Git-Tag: mutt-1-3-14-rel~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=02c70c7ca7dbb39fb13f3b6cad4fdf1edaf19b15;p=mutt patch-1.3.13.tk.ssl.connect.1 --- diff --git a/mutt_ssl.c b/mutt_ssl.c index de0c206a..187fd4ee 100644 --- a/mutt_ssl.c +++ b/mutt_ssl.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1999-2000 Tommi Komulainen + * Copyright (C) 1999-2001 Tommi Komulainen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -215,8 +215,15 @@ int ssl_socket_open (CONNECTION * conn) data->ssl = SSL_new (data->ctx); SSL_set_fd (data->ssl, conn->fd); - if ((err = SSL_connect (data->ssl)) < 0) + if ((err = SSL_connect (data->ssl)) != 1) { + unsigned long e; + SSL_load_error_strings(); + while ((e = ERR_get_error()) != 0) + { + mutt_error ("%s", ERR_reason_error_string(e)); + sleep (1); + } ssl_socket_close (conn); return -1; } @@ -235,7 +242,8 @@ int ssl_socket_open (CONNECTION * conn) return -1; } - mutt_message (_("SSL connection using %s"), SSL_get_cipher (data->ssl)); + mutt_message (_("SSL connection using %s (%s)"), + SSL_get_cipher_version (data->ssl), SSL_get_cipher_name (data->ssl)); sleep (1); return 0;