summaryrefslogtreecommitdiffstats
path: root/plugins/check_curl.c
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2017-04-21 08:20:52 +0200
committerSven Nierlein <sven@nierlein.de>2018-10-22 16:30:31 +0200
commitf4a7a3b3e7aa0cda2153b68fecaa1f76ed2b2392 (patch)
treea1a3c77eed4d8be8871c2074ff064fae9eada8e5 /plugins/check_curl.c
parentc0be97f1541ee71a6414e3ad05f9d5a5fe480c98 (diff)
downloadmonitoring-plugins-f4a7a3b3e7aa0cda2153b68fecaa1f76ed2b2392.tar.gz
small cleanup
Diffstat (limited to 'plugins/check_curl.c')
-rw-r--r--plugins/check_curl.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index d3f3930f..261c534a 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -49,9 +49,6 @@ const char *email = "devel@monitoring-plugins.org";
49#include "curl/curl.h" 49#include "curl/curl.h"
50#include "curl/easy.h" 50#include "curl/easy.h"
51 51
52/* TODO: probe this one, how!? */
53#define LIBCURL_USES_OPENSSL
54
55#include "picohttpparser.h" 52#include "picohttpparser.h"
56 53
57#define MAKE_LIBCURL_VERSION(major, minor, patch) ((major)*0x10000 + (minor)*0x100 + (patch)) 54#define MAKE_LIBCURL_VERSION(major, minor, patch) ((major)*0x10000 + (minor)*0x100 + (patch))
@@ -91,6 +88,7 @@ typedef struct {
91 char *first_line; /* a copy of the first line */ 88 char *first_line; /* a copy of the first line */
92} curlhelp_statusline; 89} curlhelp_statusline;
93 90
91/* to know the underlying SSL library used by libcurl */
94typedef enum curlhelp_ssl_library { 92typedef enum curlhelp_ssl_library {
95 CURLHELP_SSL_LIBRARY_UNKNOWN, 93 CURLHELP_SSL_LIBRARY_UNKNOWN,
96 CURLHELP_SSL_LIBRARY_OPENSSL, 94 CURLHELP_SSL_LIBRARY_OPENSSL,
@@ -558,10 +556,11 @@ check_http (void)
558 } 556 }
559 if (verbose >= 2) 557 if (verbose >= 2)
560 printf ("**** REQUEST CERTIFICATES ****\n"); 558 printf ("**** REQUEST CERTIFICATES ****\n");
561 // TODO: either convert data to X509 certs we can check with np_net_ssl_check_certificate 559 /* TODO: either convert data to X509 certs we can check with np_net_ssl_check_certificate
562 // or do something on our own.. 560 * or do something on our own..
563 //~ result = np_net_ssl_check_certificate(cert, days_till_exp_warn, days_till_exp_crit); 561 * result = np_net_ssl_check_certificate(cert, days_till_exp_warn, days_till_exp_crit);
564 //~ return result; 562 * return result;
563 */
565 die (STATE_UNKNOWN, "HTTP UNKNOWN - CERTINFO certificate checks not implemented yet\n"); 564 die (STATE_UNKNOWN, "HTTP UNKNOWN - CERTINFO certificate checks not implemented yet\n");
566 } 565 }
567 } 566 }
@@ -1475,8 +1474,7 @@ curlhelp_freereadbuffer (curlhelp_read_curlbuf *buf)
1475 buf->buf = NULL; 1474 buf->buf = NULL;
1476} 1475}
1477 1476
1478/* TODO: should be moved into 'gl' and should be probed, glibc has 1477/* TODO: where to put this, it's actually part of sstrings2 (logically)?
1479 * a strrstr
1480 */ 1478 */
1481const char* 1479const char*
1482strrstr2(const char *haystack, const char *needle) 1480strrstr2(const char *haystack, const char *needle)