diff options
| author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-03-12 20:12:37 +0100 |
|---|---|---|
| committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-04-18 00:20:12 +0200 |
| commit | 907b933a87ae21ad776c53a2dd7f04beb220b6bf (patch) | |
| tree | 0de0332d0921f3a77781c86d6b96f3264b41d043 /plugins/check_curl.c | |
| parent | f7687d47cb0841d0bc12ef205fcbaef8bf2e3805 (diff) | |
| download | monitoring-plugins-907b933.tar.gz | |
Fixes for -Wunused-parameters
Diffstat (limited to 'plugins/check_curl.c')
| -rw-r--r-- | plugins/check_curl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index b7137145..41c25d9c 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
| @@ -244,7 +244,7 @@ void curlhelp_freewritebuffer (curlhelp_write_curlbuf*); | |||
| 244 | int curlhelp_initreadbuffer (curlhelp_read_curlbuf *, const char *, size_t); | 244 | int curlhelp_initreadbuffer (curlhelp_read_curlbuf *, const char *, size_t); |
| 245 | int curlhelp_buffer_read_callback (void *, size_t , size_t , void *); | 245 | int curlhelp_buffer_read_callback (void *, size_t , size_t , void *); |
| 246 | void curlhelp_freereadbuffer (curlhelp_read_curlbuf *); | 246 | void curlhelp_freereadbuffer (curlhelp_read_curlbuf *); |
| 247 | curlhelp_ssl_library curlhelp_get_ssl_library (CURL*); | 247 | curlhelp_ssl_library curlhelp_get_ssl_library (); |
| 248 | const char* curlhelp_get_ssl_library_string (curlhelp_ssl_library); | 248 | const char* curlhelp_get_ssl_library_string (curlhelp_ssl_library); |
| 249 | int net_noopenssl_check_certificate (cert_ptr_union*, int, int); | 249 | int net_noopenssl_check_certificate (cert_ptr_union*, int, int); |
| 250 | 250 | ||
| @@ -297,6 +297,7 @@ main (int argc, char **argv) | |||
| 297 | 297 | ||
| 298 | int verify_callback(int preverify_ok, X509_STORE_CTX *x509_ctx) | 298 | int 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 | ||
| 322 | CURLcode sslctxfun(CURL *curl, SSL_CTX *sslctx, void *parm) | 323 | CURLcode 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? */ |
| 2383 | curlhelp_ssl_library | 2386 | curlhelp_ssl_library |
| 2384 | curlhelp_get_ssl_library (CURL* curl) | 2387 | curlhelp_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; |
