aboutsummaryrefslogtreecommitdiff
path: root/plugins/t
diff options
context:
space:
mode:
authorGravatar Sven Nierlein <sven@nierlein.de> 2021-04-07 17:51:38 +0200
committerGravatar GitHub <noreply@github.com> 2021-04-07 17:51:38 +0200
commitf6fd14e886e2c5f6bf141e9542cf6212a1a6f5b5 (patch)
tree6c447eec21bc28fbd7cd4b78493b110889116c94 /plugins/t
parentb145ea19981a1ac07c8d8a0eaeb7f1450f4b1914 (diff)
parent6993c216955a54845d98dc568534613334c0b545 (diff)
downloadmonitoring-plugins-f6fd14e886e2c5f6bf141e9542cf6212a1a6f5b5.tar.gz
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
Diffstat (limited to 'plugins/t')
-rw-r--r--plugins/t/check_curl.t5
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;
use POSIX qw/mktime strftime/;
use NPTest;
-plan tests => 57;
+plan tests => 58;
my $successOutput = '/OK.*HTTP.*second/';
@@ -94,6 +94,9 @@ SKIP: {
$res = NPTest->testCmd("./$plugin -v -H $host_tls_http:443 -S -p 443");
like( $res->output, '/^Host: '.$host_tls_http.'\s*$/ms', "Host Header OK" );
+
+ $res = NPTest->testCmd("./$plugin -v -H $host_tls_http -D -p 443");
+ like( $res->output, '/(^Host: '.$host_tls_http.'\s*$)|(cURL returned 60)/ms', "Host Header OK" );
};
SKIP: {