mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-03-23 10:53:03 -04:00
Enhance SSL initialization problems (Phil Dibowitz - 1055120)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@902 f882894a-f735-0410-b71e-b25c423dba1c
This commit is contained in:
parent
20cb4595fa
commit
43f7946598
1 changed files with 3 additions and 2 deletions
|
|
@ -529,8 +529,9 @@ connect_SSL (void)
|
|||
|
||||
/* Initialize SSL context */
|
||||
SSLeay_add_ssl_algorithms ();
|
||||
meth = SSLv2_client_method ();
|
||||
meth = SSLv23_client_method ();
|
||||
SSL_load_error_strings ();
|
||||
OpenSSL_add_all_algorithms();
|
||||
if ((ctx = SSL_CTX_new (meth)) == NULL)
|
||||
{
|
||||
printf (_("ERROR: Cannot create SSL context.\n"));
|
||||
|
|
@ -553,7 +554,7 @@ connect_SSL (void)
|
|||
if ((ssl = SSL_new (ctx)) != NULL)
|
||||
{
|
||||
SSL_set_fd (ssl, sd);
|
||||
if (SSL_connect (ssl) != -1)
|
||||
if (SSL_connect(ssl) == 1)
|
||||
return OK;
|
||||
ERR_print_errors_fp (stderr);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue