summaryrefslogtreecommitdiffstats
path: root/plugins/check_curl.c
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-03-12 19:12:37 (GMT)
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-04-17 22:20:12 (GMT)
commit907b933a87ae21ad776c53a2dd7f04beb220b6bf (patch)
tree0de0332d0921f3a77781c86d6b96f3264b41d043 /plugins/check_curl.c
parentf7687d47cb0841d0bc12ef205fcbaef8bf2e3805 (diff)
downloadmonitoring-plugins-907b933a87ae21ad776c53a2dd7f04beb220b6bf.tar.gz
Fixes for -Wunused-parameters
Diffstat (limited to 'plugins/check_curl.c')
-rw-r--r--plugins/check_curl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index b713714..41c25d9 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -244,7 +244,7 @@ void curlhelp_freewritebuffer (curlhelp_write_curlbuf*);
244int curlhelp_initreadbuffer (curlhelp_read_curlbuf *, const char *, size_t); 244int curlhelp_initreadbuffer (curlhelp_read_curlbuf *, const char *, size_t);
245int curlhelp_buffer_read_callback (void *, size_t , size_t , void *); 245int curlhelp_buffer_read_callback (void *, size_t , size_t , void *);
246void curlhelp_freereadbuffer (curlhelp_read_curlbuf *); 246void curlhelp_freereadbuffer (curlhelp_read_curlbuf *);
247curlhelp_ssl_library curlhelp_get_ssl_library (CURL*); 247curlhelp_ssl_library curlhelp_get_ssl_library ();
248const char* curlhelp_get_ssl_library_string (curlhelp_ssl_library); 248const char* curlhelp_get_ssl_library_string (curlhelp_ssl_library);
249int net_noopenssl_check_certificate (cert_ptr_union*, int, int); 249int net_noopenssl_check_certificate (cert_ptr_union*, int, int);
250 250
@@ -297,6 +297,7 @@ main (int argc, char **argv)
297 297
298int verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx) 298int verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
299{ 299{
300 (void) preverify_ok;
300 /* TODO: we get all certificates of the chain, so which ones 301 /* TODO: we get all certificates of the chain, so which ones
301 * should we test? 302 * should we test?
302 * TODO: is the last certificate always the server certificate? 303 * TODO: is the last certificate always the server certificate?
@@ -321,6 +322,8 @@ int verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx)
321 322
322CURLcode sslctxfun(CURL *curl, SSL_CTX *sslctx, void *parm) 323CURLcode sslctxfun(CURL *curl, SSL_CTX *sslctx, void *parm)
323{ 324{
325 (void) curl; // ignore unused parameter
326 (void) parm; // ignore unused parameter
324 SSL_CTX_set_verify(sslctx, SSL_VERIFY_PEER, verify_callback); 327 SSL_CTX_set_verify(sslctx, SSL_VERIFY_PEER, verify_callback);
325 328
326 return CURLE_OK; 329 return CURLE_OK;
@@ -646,7 +649,7 @@ check_http (void)
646 } 649 }
647 650
648 /* detect SSL library used by libcurl */ 651 /* detect SSL library used by libcurl */
649 ssl_library = curlhelp_get_ssl_library (curl); 652 ssl_library = curlhelp_get_ssl_library ();
650 653
651 /* try hard to get a stack of certificates to verify against */ 654 /* try hard to get a stack of certificates to verify against */
652 if (check_cert) { 655 if (check_cert) {
@@ -2381,7 +2384,7 @@ get_content_length (const curlhelp_write_curlbuf* header_buf, const curlhelp_wri
2381 2384
2382/* TODO: is there a better way in libcurl to check for the SSL library? */ 2385/* TODO: is there a better way in libcurl to check for the SSL library? */
2383curlhelp_ssl_library 2386curlhelp_ssl_library
2384curlhelp_get_ssl_library (CURL* curl) 2387curlhelp_get_ssl_library ()
2385{ 2388{
2386 curl_version_info_data* version_data; 2389 curl_version_info_data* version_data;
2387 char *ssl_version; 2390 char *ssl_version;