summaryrefslogtreecommitdiffstats
path: root/plugins/check_curl.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_curl.c')
-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)