Sven Nierlein
5368e24616
check_curl: cleanup
...
- remove obsolete todos
- change exit code to unknown if regex exectute fails
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2018-10-22 16:30:31 +02:00
Andreas Baumann
8120c53f90
set ssl_version to CURL_SSLVERSION_DEFAULT and not CURL_SSLVERSION_TLSv1_0
...
(since curl 7.56.1 we get an illegal argument error otherwise)
2018-10-22 16:30:31 +02:00
Andreas Baumann
8a5b49ec36
added -b <proxy_auth> to print_usage
2018-10-22 16:30:31 +02:00
Sven Nierlein
7ad8bcba5b
check_curl: add proxy auth option
2018-10-22 16:30:31 +02:00
Sven Nierlein
8172fe7f30
check_curl: update docs
2018-10-22 16:30:31 +02:00
Sven Nierlein
603dd23d11
check_curl: add legacy http request support
2018-10-22 16:30:31 +02:00
Sven Nierlein
e09629ef65
check_curl: add docs about https proxy
2018-10-22 16:30:31 +02:00
Sven Nierlein
7344524655
check_curl: clean whitespace
2018-10-22 16:30:31 +02:00
Sven Nierlein
787e6986ee
check_curl: handle proxied https requests
2018-10-22 16:30:31 +02:00
Andreas Baumann
7eb43858db
fixed some printf bugs and switched to libcurl4-openssl for Travis tests
2018-10-22 16:30:31 +02:00
Andreas Baumann
00cb1408ad
fixed redirect sticky port handling in redir
2018-10-22 16:30:31 +02:00
Andreas Baumann
a739a56148
some rework:
...
- added old style 'redir' function and options along to a new
libcurl internal 'follow' parameter 'curl'
- moved picohttpparser to it's own subdirectory
- added uriparser to be used instead of the home-grown parser in
'redir'
2018-10-22 16:30:31 +02:00
Andreas Baumann
f0cebd5153
fixed failing tests due to wrong content_length calculation
2018-10-22 16:30:31 +02:00
Andreas Baumann
94d017c5ab
fixed getopt (-l missing, wrong order, hard to compare with check_http.c)
2018-10-22 16:30:31 +02:00
Andreas Baumann
6bc2646409
more tolerant CERTINFO parsing
2018-10-22 16:30:31 +02:00
Andreas Baumann
4b66d3d90a
using CURLOPT_RESOLVE to make sure -I is the IP we connect to
2018-10-22 16:30:31 +02:00
Andreas Baumann
efa7e2c1e7
changed URL construction again, IP should preceed hostname, hostname set as Host: (makes sure we get the corrent DNS entry and server)
2018-10-22 16:30:31 +02:00
Andreas Baumann
5d9104f07f
page length is computed from header, fallback to actual body size (get_content_length)
2018-10-22 16:30:31 +02:00
Andreas Baumann
cfb7dace54
fixed setting host_name or server_address in curl URL option
2018-10-22 16:30:31 +02:00
Andreas Baumann
ac08e9b275
reverted hostname in URL, must use CURL_RESOLVE mayabe
2018-10-22 16:30:31 +02:00
Andreas Baumann
7c74b772ed
must use host_name and not server_address in URL, CN subject mismatch
2018-10-22 16:30:31 +02:00
Andreas Baumann
f91be546bf
disable non-OpenSSL code compilation in -C check if we have USE_OPENSSL set
2018-10-22 16:30:31 +02:00
Andreas Baumann
82744e9705
made non-OpenSSL version of certificate -C check work
2018-10-22 16:30:31 +02:00
Andreas Baumann
229b9e53e1
handling the -C check now when compiled with OpenSSL but libcurl is not compiled with OpenSSL
2018-10-22 16:30:31 +02:00
Andreas Baumann
2da7575196
preparing for certificate checks (non-OpenSSL version)
2018-10-22 16:30:31 +02:00
Andreas Baumann
f4a7a3b3e7
small cleanup
2018-10-22 16:30:31 +02:00
Andreas Baumann
c0be97f154
probing for SSL library used by libcurl and started improving the certificate check -C
2018-10-22 16:30:31 +02:00
Andreas Baumann
995ab6572f
using curl_getdate instead of local parse_time_string, added verbose debug code for -M<d>
2018-10-22 16:30:31 +02:00
Andreas Baumann
e65cf6a32f
small fixes and cleanups around SSL, be more tolerant to -S<x> options
2018-10-22 16:30:31 +02:00
Andreas Baumann
f99b9352d4
for now we set LIBCURL_USES_OPENSSL always
2018-10-22 16:30:31 +02:00
Andreas Baumann
260291c08b
made check_curl compile also if we have openssl disabled
2018-10-22 16:30:31 +02:00
Andreas Baumann
88f566adf5
fixed some libcurl checks and minimal versions
2018-10-22 16:30:31 +02:00
Andreas Baumann
55e8d89b0a
some work on certificate checking for non-OpenSSL libraries
2018-10-22 16:30:31 +02:00
Andreas Baumann
cee5f2777d
small fix and we see CURLOPT_SSL_CTX_FUNCTION does not work on Centos 6?
2018-10-22 16:30:31 +02:00
Andreas Baumann
304e04a384
some cleanup and added error handling around curl_easy_getinfo/curl_easy_setopt
2018-10-22 16:30:31 +02:00
Andreas Baumann
54c8f76c72
fixed test outputs for status line checks
...
handling empty data in POST and PUT
handling data upload (from -P <postdata>) also in PUT
2018-10-22 16:30:31 +02:00
Andreas Baumann
3c681a2ec5
added -n and more display_html stuff
2018-10-22 16:30:31 +02:00
Andreas Baumann
f4a49a8b34
added -L option
2018-10-22 16:30:31 +02:00
Andreas Baumann
d5d71dde61
fixed non-C99-ism in get_header_value
2018-10-22 16:30:31 +02:00
Andreas Baumann
9960c56e5e
added -M<m> age option for document age, using picohttpparser from h2o (maybe handy
...
later to make a more robust header condition checker?)
2018-10-22 16:30:31 +02:00
Andreas Baumann
f890d271fd
added POST support (-P/-T options)
2018-10-22 16:30:31 +02:00
Andreas Baumann
3299fbe3c1
fixed handling of SSL/TLS protocol versions
2018-10-22 16:30:31 +02:00
Andreas Baumann
6575340888
added -l option, fixed some usage/help
2018-10-22 16:30:31 +02:00
Andreas Baumann
f67f05c450
added -d/--header-string option
2018-10-22 16:30:31 +02:00
Sven Nierlein
c6c90a5bfa
check_curl: implement -e/--expect
2018-10-22 16:30:31 +02:00
Sven Nierlein
a793540bbb
check_curl: support check_http arguments for backwards compatibility
2018-10-22 16:30:31 +02:00
Sven Nierlein
5f9e8fa1e7
check_curl: adopt output format from check_http
2018-10-22 16:30:31 +02:00
Andreas Baumann
dee8f760d3
added -4/-6 option
2018-10-22 16:28:51 +02:00
Andreas Baumann
a478dfe512
added -m/--pagesize option
2018-10-22 16:28:51 +02:00
Andreas Baumann
6e52b870f6
added help for --invert-regex
2018-10-22 16:28:51 +02:00
Andreas Baumann
2678d7fabc
added -R/-ereg/-eregi
2018-10-22 16:28:51 +02:00
Andreas Baumann
50577bf9b1
added -N/--no-body option
2018-10-22 16:28:51 +02:00
Andreas Baumann
ec8de89a44
added usage and help for -E/--extended-perfdata
2018-10-22 16:28:51 +02:00
Andreas Baumann
4dc982097e
reverted double header in longopts
2018-10-22 16:28:51 +02:00
Andreas Baumann
5d2fa85f1e
added help/usage and getopt long struct member for -k/--header option
2018-10-22 16:28:51 +02:00
Andreas Baumann
20fd1ade91
fixed a missing else before curl_easy_setopt CURLOPT_CUSTOMREQUEST
2018-10-22 16:28:51 +02:00
Sven Nierlein
e57c8a9d96
check_curl: set correct host header
...
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2018-10-22 16:28:51 +02:00
Sven Nierlein
b5fd0d1a17
check_curl: implement extended performance data
...
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2018-10-22 16:28:51 +02:00
Sven Nierlein
16121a9b55
check_curl: implement certificate checks
...
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2018-10-22 16:28:51 +02:00
Sven Nierlein
c6c4890702
check_curl: implement optional http headers
...
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2018-10-22 16:28:51 +02:00
Andreas Baumann
d74e9569b9
added HTTP method handling
2018-10-22 16:28:51 +02:00
Andreas Baumann
83ae37dc7e
forgot declaration of INVERT_REGEX in getopt otions
2018-10-22 16:28:51 +02:00
Andreas Baumann
c9a94ffd44
added some casts for curl write functions
2018-10-22 16:28:51 +02:00
Andreas Baumann
ad9233ce1c
added -r and --invert-regex
2018-10-22 16:28:51 +02:00
Andreas Baumann
556924316a
added -ca-file option
2018-10-22 16:28:51 +02:00
Andreas Baumann
035fe1eb79
handling last HTTP header correctly in HTTP line parser (added a strrstr replacement)
2018-10-22 16:28:51 +02:00
Andreas Baumann
cefe325e94
some comment cleanup
2018-10-22 16:28:51 +02:00
Andreas Baumann
2b8f17e577
adapted to style, using header file shims instead of HAVE_XXX by hand
2018-10-22 16:28:51 +02:00
Andreas Baumann
c3bf9bd675
fixed curl error message
2018-10-22 16:28:51 +02:00
Andreas Baumann
67967df159
added -s option
2018-10-22 16:28:51 +02:00
Andreas Baumann
2a9812ee43
added most options from nagios-curl-plugin
2018-10-22 16:28:51 +02:00
Andreas Baumann
0b85260bd2
added autoconf stuff for curl plugin, created empty plugin
2018-10-22 16:28:51 +02:00