aboutsummaryrefslogtreecommitdiff
path: root/plugins/t/check_http.t
diff options
context:
space:
mode:
authorGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2011-02-04 00:54:52 -0500
committerGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2011-02-04 00:54:52 -0500
commit4611e41bc50d15275b316c6f21b688997a9c78c4 (patch)
tree1de69d9b99ef3986d5680fd9b8a581ce150dd93e /plugins/t/check_http.t
parent1a5a83bb82c35d888229fe9f815fbc663c0f4d3c (diff)
downloadmonitoring-plugins-4611e41bc50d15275b316c6f21b688997a9c78c4.tar.gz
check_http: check for and print the certificate cn
This patch adds a check for the certificate cn (hostname) to normal certificate checks. It returns CRITICAL if th cn is missing, otherwise it prints it in the normal output. Patch by Stéphane Urbanovski
Diffstat (limited to 'plugins/t/check_http.t')
-rw-r--r--plugins/t/check_http.t2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t
index c43a64a9..55a5a530 100644
--- a/plugins/t/check_http.t
+++ b/plugins/t/check_http.t
@@ -102,7 +102,7 @@ SKIP: {
$res = NPTest->testCmd( "./check_http -C 1 --ssl www.verisign.com" );
cmp_ok( $res->return_code, '==', 0, "Checking certificate for www.verisign.com");
- like ( $res->output, '/Certificate will expire on/', "Output OK" );
+ like ( $res->output, "/Certificate 'www.verisign.com' will expire on/", "Output OK" );
my $saved_cert_output = $res->output;
$res = NPTest->testCmd( "./check_http www.verisign.com -C 1" );