diff options
author | Sven Nierlein <sven@nierlein.de> | 2020-05-15 11:33:48 (GMT) |
---|---|---|
committer | Sven Nierlein <sven@nierlein.org> | 2020-05-15 12:22:51 (GMT) |
commit | b12358535458b853d287551054331e477b58320a (patch) | |
tree | ee94a6993ed9f86bdcd288b8eb123c7698179553 /plugins/tests/check_http.t | |
parent | 4264e7a6edb651793ef751723537767656a89e44 (diff) | |
download | monitoring-plugins-b12358535458b853d287551054331e477b58320a.tar.gz |
tests: update expired test certificate
the certificate used to test expired http checks is to old to be used
with recent ssl libraries and results in:
> SSL routines:SSL_CTX_use_certificate:ee key too small
unfortunatly the error is only visible when setting $IO::Socket::SSL::DEBUG in
the check_http.t file.
Diffstat (limited to 'plugins/tests/check_http.t')
-rwxr-xr-x | plugins/tests/check_http.t | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/tests/check_http.t b/plugins/tests/check_http.t index 006f133..bfecff2 100755 --- a/plugins/tests/check_http.t +++ b/plugins/tests/check_http.t | |||
@@ -4,6 +4,8 @@ | |||
4 | # | 4 | # |
5 | # To create the https server certificate: | 5 | # To create the https server certificate: |
6 | # openssl req -new -x509 -keyout server-key.pem -out server-cert.pem -days 3650 -nodes | 6 | # openssl req -new -x509 -keyout server-key.pem -out server-cert.pem -days 3650 -nodes |
7 | # to create a new expired certificate: | ||
8 | # faketime '2008-01-01 12:00:00' openssl req -new -x509 -keyout expired-key.pem -out expired-cert.pem -days 1 -nodes | ||
7 | # Country Name (2 letter code) [AU]:DE | 9 | # Country Name (2 letter code) [AU]:DE |
8 | # State or Province Name (full name) [Some-State]:Bavaria | 10 | # State or Province Name (full name) [Some-State]:Bavaria |
9 | # Locality Name (eg, city) []:Munich | 11 | # Locality Name (eg, city) []:Munich |
@@ -208,7 +210,7 @@ SKIP: { | |||
208 | $result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" ); | 210 | $result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" ); |
209 | is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" ); | 211 | is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" ); |
210 | is( $result->output, | 212 | is( $result->output, |
211 | 'CRITICAL - Certificate \'Ton Voon\' expired on Thu Mar 5 00:13:16 2009 +0000.', | 213 | 'CRITICAL - Certificate \'Monitoring Plugins\' expired on Wed Jan 2 11:00:26 2008 +0000.', |
212 | "output ok" ); | 214 | "output ok" ); |
213 | 215 | ||
214 | } | 216 | } |