[monitoring-plugins] check_curl.c: bugfix: verify certificates option ...

Barak Shohat git at monitoring-plugins.org
Wed Nov 17 18:00:12 CET 2021


 Module: monitoring-plugins
 Branch: master
 Commit: 63cb7ecfcf8d5b6c9f2be704eee7fa7cd9216f88
 Author: Barak Shohat <barak at bazzisoft.com>
   Date: Mon May 24 13:42:43 2021 +0300
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=63cb7ec

check_curl.c: bugfix: verify certificates option should not force SSL to be used

---

 plugins/check_curl.c   | 2 +-
 plugins/t/check_curl.t | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index 3e0a6f9..d29db0a 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -1346,7 +1346,7 @@ process_arguments (int argc, char **argv)
 #ifdef LIBCURL_FEATURE_SSL
     case 'D': /* verify peer certificate & host */
       verify_peer_and_host = TRUE;
-      goto enable_ssl;
+      break;
 #endif
     case 'S': /* use SSL */
 #ifdef LIBCURL_FEATURE_SSL
diff --git a/plugins/t/check_curl.t b/plugins/t/check_curl.t
index 45ee533..ada6a04 100644
--- a/plugins/t/check_curl.t
+++ b/plugins/t/check_curl.t
@@ -95,7 +95,7 @@ SKIP: {
         $res = NPTest->testCmd("./$plugin -v -H $host_tls_http:443 -S -p 443");
         like( $res->output, '/^Host: '.$host_tls_http.'\s*$/ms', "Host Header OK" );
 
-        $res = NPTest->testCmd("./$plugin -v -H $host_tls_http -D -p 443");
+        $res = NPTest->testCmd("./$plugin -v -H $host_tls_http -D -S -p 443");
         like( $res->output, '/(^Host: '.$host_tls_http.'\s*$)|(cURL returned 60)/ms', "Host Header OK" );
 };
 



More information about the Commits mailing list