diff options
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2011-02-04 05:54:52 (GMT) |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | 2011-02-04 05:54:52 (GMT) |
commit | 4611e41bc50d15275b316c6f21b688997a9c78c4 (patch) | |
tree | 1de69d9b99ef3986d5680fd9b8a581ce150dd93e /plugins/t | |
parent | 1a5a83bb82c35d888229fe9f815fbc663c0f4d3c (diff) | |
download | monitoring-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.t | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/t/check_http.t b/plugins/t/check_http.t index c43a64a..55a5a53 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" ); |