summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-04-19 16:38:30 +0000
committerAndreas Baumann <mail@andreasbaumann.cc>2017-04-19 16:38:30 +0000
commit2643d850723e380801cff6ac74f7ec5b094d6a96 (patch)
treee40281ab2599b2ee0f22726b5bf1986659c3b661
parent2a226a94b33c0d777fa26f0570ebc44a9c80258c (diff)
downloadmonitoring-plugins-2643d85.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 9b14486f..b5137129 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)