summaryrefslogtreecommitdiffstats
path: root/plugins/t
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2011-02-04 00:54:52 -0500
committerThomas Guyot-Sionnest <dermoth@aei.ca>2011-02-04 00:54:52 -0500
commit4611e41bc50d15275b316c6f21b688997a9c78c4 (patch)
tree1de69d9b99ef3986d5680fd9b8a581ce150dd93e /plugins/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')
-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: {
102 102
103 $res = NPTest->testCmd( "./check_http -C 1 --ssl www.verisign.com" ); 103 $res = NPTest->testCmd( "./check_http -C 1 --ssl www.verisign.com" );
104 cmp_ok( $res->return_code, '==', 0, "Checking certificate for www.verisign.com"); 104 cmp_ok( $res->return_code, '==', 0, "Checking certificate for www.verisign.com");
105 like ( $res->output, '/Certificate will expire on/', "Output OK" ); 105 like ( $res->output, "/Certificate 'www.verisign.com' will expire on/", "Output OK" );
106 my $saved_cert_output = $res->output; 106 my $saved_cert_output = $res->output;
107 107
108 $res = NPTest->testCmd( "./check_http www.verisign.com -C 1" ); 108 $res = NPTest->testCmd( "./check_http www.verisign.com -C 1" );