diff options
author | Barak Shohat <barak@bazzisoft.com> | 2021-04-07 12:34:46 +0300 |
---|---|---|
committer | Jan Wagner <waja@cyconet.org> | 2021-04-10 13:43:12 +0200 |
commit | 827c3e80efe8ec30e3f9029d4c65104bf106984c (patch) | |
tree | d06c538a85ad7f334a9f8b1bf581c8c59d07177c /plugins/t | |
parent | 822fb4ebe45d15426165859b185429cd64db4c26 (diff) | |
download | monitoring-plugins-827c3e80efe8ec30e3f9029d4c65104bf106984c.tar.gz |
Add an option to check_curl to verify the peer certificate & host using the system CA's
Diffstat (limited to 'plugins/t')
-rw-r--r-- | plugins/t/check_curl.t | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/t/check_curl.t b/plugins/t/check_curl.t index cc65f037..a4f1dfb3 100644 --- a/plugins/t/check_curl.t +++ b/plugins/t/check_curl.t | |||
@@ -9,7 +9,7 @@ use Test::More; | |||
9 | use POSIX qw/mktime strftime/; | 9 | use POSIX qw/mktime strftime/; |
10 | use NPTest; | 10 | use NPTest; |
11 | 11 | ||
12 | plan tests => 57; | 12 | plan tests => 58; |
13 | 13 | ||
14 | my $successOutput = '/OK.*HTTP.*second/'; | 14 | my $successOutput = '/OK.*HTTP.*second/'; |
15 | 15 | ||
@@ -94,6 +94,9 @@ SKIP: { | |||
94 | 94 | ||
95 | $res = NPTest->testCmd("./$plugin -v -H $host_tls_http:443 -S -p 443"); | 95 | $res = NPTest->testCmd("./$plugin -v -H $host_tls_http:443 -S -p 443"); |
96 | like( $res->output, '/^Host: '.$host_tls_http.'\s*$/ms', "Host Header OK" ); | 96 | like( $res->output, '/^Host: '.$host_tls_http.'\s*$/ms', "Host Header OK" ); |
97 | |||
98 | $res = NPTest->testCmd("./$plugin -v -H $host_tls_http -D -p 443"); | ||
99 | like( $res->output, '/(^Host: '.$host_tls_http.'\s*$)|(cURL returned 60)/ms', "Host Header OK" ); | ||
97 | }; | 100 | }; |
98 | 101 | ||
99 | SKIP: { | 102 | SKIP: { |