Commit graph

122 commits

Author SHA1 Message Date
RincewindsHat
ad45727dbe
Merge pull request #1688 from bazzisoft/master
check_curl.c: bugfix: verify certificates option should not force SSL to be used
2021-11-17 17:57:00 +01:00
Andreas Baumann
de5503063e check_curl: fixed a potential buffer overflow in retir/uri_string 2021-07-25 18:49:06 +02:00
Andreas Baumann
3f5c54c783 check_curl: fixed DNS caching for SSL hostnames (avoid CURLOPT_RESOLVE entry errors) 2021-07-25 18:39:07 +02:00
Andreas Baumann
6e696643a5 check_curl: changed to STATE_CRITICAL for infinite loops (-ffollow) 2021-07-04 18:43:42 +02:00
Andreas Baumann
0b6838ffca fix for missing X509_up_ref on old systems with only OpenSSL 1.0 2021-06-24 17:08:20 +00:00
Andreas Baumann
20e9451fad added option --enable-automatic-decompression 2021-06-24 11:02:28 +02:00
Andreas Baumann
beb609ffcf check_curl:
- added verbose output in verify_callback
- pin refcounting for certs (avoid subject extraction error when checking
  certs in is_openssl_callback mode)
2021-05-27 15:32:08 +02:00
Barak Shohat
63cb7ecfcf check_curl.c: bugfix: verify certificates option should not force SSL to be used 2021-05-24 14:53:58 +03:00
Barak Shohat
f0ac7fcc7c check_curl: Fix bug where headers beginning with HTTP_ cause the status line parsing to fail. 2021-04-13 12:06:18 +02:00
Andreas Baumann
cd358cd08a check_curl: backported --show-body/-B to print body (from check_http) 2021-04-08 20:39:48 +02:00
Andreas Baumann
1debd29b57 check_curl: make -C obvious (from check_http, part 2) 2021-04-08 15:14:53 +02:00
Andreas Baumann
a6acea7941 check_curl: make -C obvious (from check_http) 2021-04-08 14:15:54 +02:00
Andreas Baumann
f90aec83cb check_curl: Increase regexp limit (to 1024 as in check_http) 2021-04-08 14:07:20 +02:00
Sven Nierlein
f6fd14e886
Merge pull request #1669 from bazzisoft/verify-cert
Add an option to check_curl to verify the peer certificate & host using the system CA's
2021-04-07 17:51:38 +02:00
Barak Shohat
6993c21695 Add an option to check_curl to verify the peer certificate & host using the system CA's 2021-04-07 15:38:47 +03:00
Sven Nierlein
1033724797
Merge pull request #1668 from bazzisoft/master
Update check_curl.c to display a specific human-readable error message where possible
2021-04-07 11:49:10 +02:00
Barak Shohat
2482950e26 Updated check_curl.c to display a specific human-readable error message where possible 2021-04-07 12:36:55 +03:00
Sven Nierlein
2e5b38cc83
Merge pull request #1666 from sni/check_curl_fix_header_parser
fix check_curl crash if http header contains leading spaces
2021-04-07 10:30:31 +02:00
Sven Nierlein
5cfc93d995 fix check_curl crash if http header contains leading spaces
check_curl crashes when a (broken) http server returns invalid http header with
leading spaces or double colons. This PR adds a fix and a test case for this.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
2021-03-11 13:33:16 +01:00
Andreas Baumann
0f926a3566 check_curl: added string_statuscode function for printing HTTP/1.1 and HTTP/2 correctly 2021-03-08 19:46:43 +01:00
Andreas Baumann
d9a5d1faf0 check_curl: fixed a potential buffer overflow in url buffer 2021-01-19 18:35:41 +01:00
Andreas Baumann
ede8defad4 check_curl: fixed help, usage and errors for TLS 1.3 2021-01-19 18:32:27 +01:00
Sven Nierlein
772fb233b9 check_curl: host_name may be null
for example when using like: ./check_curl localhost
2020-05-18 14:08:45 +02:00
Sven Nierlein
84fd9ae893 check_curl: use CURLOPT_RESOLVE to fix connecting to the right ip
when using ssl, the composed url contains the hostname instead of the specified
ip. So use CURLOPT_RESOLVE to make curl still connect to the ip.
2020-05-18 13:43:17 +02:00
Sven Nierlein
8a64e47083 check_curl: clean trailing whitespace 2020-05-18 11:30:34 +02:00
Andreas Baumann
5e0c236d6a increased copyright 2019-12-29 10:23:02 +00:00
Andreas Baumann
1b689dab5e check_curl: NSS, parse more date formats from certificate (in -C cert check) 2019-11-07 15:31:52 +00:00
Andreas Baumann
f7efee5f9c check_curl: more tolerant CN= parsing when checking certificates (hit on Centos 8) 2019-11-07 08:20:17 +00:00
Andreas Baumann
ede43c848d setting no_body to TRUE when we have a HEAD request 2019-10-11 17:22:34 +02:00
Andreas Baumann
04c58e0210 some LIBCURL_VERSION checks around HTTP/2 feature 2019-09-07 16:06:17 +02:00
Andreas Baumann
f546041722 added --http-version option to check_curl to choose HTTP version 2019-09-07 15:58:09 +02:00
Andreas Baumann
95ee6ace09 improved curlhelp_parse_statusline to handle both HTTP/1.x and HTTP/2 2019-09-07 15:31:15 +02:00
Andreas Baumann
4d666514f2 setting progname of check_curl plugin to check_curl (at least for now) 2019-09-07 11:20:13 +02:00
Andreas Baumann
faea5899ba set hostname in for CURLOPT_CURL to virtual hostname in case of SSL (for SNI to work) 2018-11-12 10:25:08 -05:00
Sven Nierlein
36fd675fbe check_curl: code cleanup
CURLOPT_RESOLVE is not required, since we do not verify certificates in any way.
2018-10-29 15:09:57 +01:00
Sven Nierlein
70d36a729e check_curl: rewrite connect_to / host headers
since CURLOPT_CONNECT_TO is only available in later curl versions, we do it the other way round now and
set the url from the address we want to connect to and then set the host header accordingly.
2018-10-25 10:35:06 +02:00
Sven Nierlein
ec590af49f check_curl: code cleanup 2018-10-24 13:36:47 +02:00
Sven Nierlein
87065ac448 check_curl: handle supplied port correctly
if a port was given by -p, it should not be overruled by the port extracted from -H.
2018-10-24 12:13:26 +02:00
Sven Nierlein
0958ce4b82 check_curl: unify performance data
and align them with check_http
2018-10-22 17:53:31 +02:00
Sven Nierlein
61571ce854 check_curl: use same page length in performance data and text output 2018-10-22 16:49:53 +02:00
Christopher Odenbach
347e749a0a Modified virtual host and port behaviour to match check_http. 2018-10-22 16:30:31 +02:00
Andreas Baumann
36ea82ff12 check_curl: changed name of plugin in user-agent and added curl_version() to it 2018-10-22 16:30:31 +02:00
Andreas Baumann
577edf4725 check_curl: removed some dead code 2018-10-22 16:30:31 +02:00
Andreas Baumann
5811729632 check_curl: removed die in redirect with relative paths, simple cases (same protocol, same host) actually work 2018-10-22 16:30:31 +02:00
Andreas Baumann
aa3b63215c ..I should really not test in test code :-) 2018-10-22 16:30:31 +02:00
Andreas Baumann
bd7fe411d5 check_curl: made HTTP message optional 2018-10-22 16:30:31 +02:00
Jean-François Rameau
30bb78e681 Avoid working with free'ed memory 2018-10-22 16:30:31 +02:00
Andreas Baumann
92bab06a45 fixed typo in check_curl error message (unparsable) 2018-10-22 16:30:31 +02:00
Andreas Baumann
46c5b54254 bumped coyright to 2018 in check_curl.c 2018-10-22 16:30:31 +02:00
Andreas Baumann
7dd0a31b28 fixed initialization of server_url (freeing non-pointer in case of redirects) 2018-10-22 16:30:31 +02:00