[monitoring-plugins] made check_curl compile also if we have openssl ...
Andreas Baumann
git at monitoring-plugins.org
Wed Apr 19 18:40:12 CEST 2017
Module: monitoring-plugins
Branch: feature_check_curl
Commit: 2643d850723e380801cff6ac74f7ec5b094d6a96
Author: Andreas Baumann <mail at andreasbaumann.cc>
Date: Wed Apr 19 16:38:30 2017 +0000
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=2643d85
made check_curl compile also if we have openssl disabled
---
plugins/check_curl.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index 9b14486..b513712 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -157,7 +157,9 @@ int ssl_version = CURL_SSLVERSION_DEFAULT;
char *client_cert = NULL;
char *client_privkey = NULL;
char *ca_cert = NULL;
+#ifdef HAVE_SSL
X509 *cert = NULL;
+#endif
int no_body = FALSE;
int maximum_age = -1;
int address_family = AF_UNSPEC;
@@ -214,6 +216,8 @@ main (int argc, char **argv)
return result;
}
+#ifdef HAVE_SSL
+
int verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
{
/* TODO: we get all certificates of the chain, so which ones
@@ -231,6 +235,8 @@ CURLcode sslctxfun(CURL *curl, SSL_CTX *sslctx, void *parm)
return CURLE_OK;
}
+#endif /* HAVE_SSL */
+
/* Checks if the server 'reply' is one of the expected 'statuscodes' */
static int
expected_statuscode (const char *reply, const char *statuscodes)
More information about the Commits
mailing list