diff options
Diffstat (limited to 'plugins')
-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 6f2aa03..126907f 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c | |||
@@ -529,8 +529,9 @@ connect_SSL (void) | |||
529 | 529 | ||
530 | /* Initialize SSL context */ | 530 | /* Initialize SSL context */ |
531 | SSLeay_add_ssl_algorithms (); | 531 | SSLeay_add_ssl_algorithms (); |
532 | meth = SSLv2_client_method (); | 532 | meth = SSLv23_client_method (); |
533 | SSL_load_error_strings (); | 533 | SSL_load_error_strings (); |
534 | OpenSSL_add_all_algorithms(); | ||
534 | if ((ctx = SSL_CTX_new (meth)) == NULL) | 535 | if ((ctx = SSL_CTX_new (meth)) == NULL) |
535 | { | 536 | { |
536 | printf (_("ERROR: Cannot create SSL context.\n")); | 537 | printf (_("ERROR: Cannot create SSL context.\n")); |
@@ -553,7 +554,7 @@ connect_SSL (void) | |||
553 | if ((ssl = SSL_new (ctx)) != NULL) | 554 | if ((ssl = SSL_new (ctx)) != NULL) |
554 | { | 555 | { |
555 | SSL_set_fd (ssl, sd); | 556 | SSL_set_fd (ssl, sd); |
556 | if (SSL_connect (ssl) != -1) | 557 | if (SSL_connect(ssl) == 1) |
557 | return OK; | 558 | return OK; |
558 | ERR_print_errors_fp (stderr); | 559 | ERR_print_errors_fp (stderr); |
559 | } | 560 | } |