summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-04-19 16:38:30 (GMT)
committerSven Nierlein <sven@nierlein.de>2018-10-22 14:30:31 (GMT)
commit260291c08bcba4335755c556802d0591b7580b34 (patch)
tree18b77b3ff2b831e0172eee1ab8266d349f557ee3
parent88f566adf5d8d852298294474a4dfabe4be6d927 (diff)
downloadmonitoring-plugins-260291c08bcba4335755c556802d0591b7580b34.tar.gz
made check_curl compile also if we have openssl disabled
-rw-r--r--plugins/check_curl.c6
1 files changed, 6 insertions, 0 deletions
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;
157char *client_cert = NULL; 157char *client_cert = NULL;
158char *client_privkey = NULL; 158char *client_privkey = NULL;
159char *ca_cert = NULL; 159char *ca_cert = NULL;
160#ifdef HAVE_SSL
160X509 *cert = NULL; 161X509 *cert = NULL;
162#endif
161int no_body = FALSE; 163int no_body = FALSE;
162int maximum_age = -1; 164int maximum_age = -1;
163int address_family = AF_UNSPEC; 165int address_family = AF_UNSPEC;
@@ -214,6 +216,8 @@ main (int argc, char **argv)
214 return result; 216 return result;
215} 217}
216 218
219#ifdef HAVE_SSL
220
217int verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx) 221int verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
218{ 222{
219 /* TODO: we get all certificates of the chain, so which ones 223 /* TODO: we get all certificates of the chain, so which ones
@@ -231,6 +235,8 @@ CURLcode sslctxfun(CURL *curl, SSL_CTX *sslctx, void *parm)
231 return CURLE_OK; 235 return CURLE_OK;
232} 236}
233 237
238#endif /* HAVE_SSL */
239
234/* Checks if the server 'reply' is one of the expected 'statuscodes' */ 240/* Checks if the server 'reply' is one of the expected 'statuscodes' */
235static int 241static int
236expected_statuscode (const char *reply, const char *statuscodes) 242expected_statuscode (const char *reply, const char *statuscodes)