--- check_tcp.c.orig Thu Sep 16 13:03:28 2004 +++ check_tcp.c Wed Oct 20 12:52:06 2004 @@ -553,8 +553,9 @@ /* 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"); @@ -577,7 +578,7 @@ 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); }