From 4611e41bc50d15275b316c6f21b688997a9c78c4 Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Fri, 4 Feb 2011 00:54:52 -0500 Subject: check_http: check for and print the certificate cn MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- plugins/t/check_http.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/t') 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" ); -- cgit v1.2.3-74-g34f1