diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2004-11-18 22:42:17 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2004-11-18 22:42:17 +0000 |
commit | 43f7946598f062f80c2c92eb3757cb9a2c8ce1ec (patch) | |
tree | 4324f62904ef40701c1f9387a2326310209bb207 | |
parent | 20cb4595faa621d6736d7fc341dc3350c5f4c5e0 (diff) | |
download | monitoring-plugins-43f7946598f062f80c2c92eb3757cb9a2c8ce1ec.tar.gz |
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
-rw-r--r-- | plugins/check_tcp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index 6f2aa036..126907f9 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -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); } |