diff options
author | Sven Nierlein <sven@nierlein.de> | 2020-05-15 13:33:48 +0200 |
---|---|---|
committer | Sven Nierlein <sven@nierlein.de> | 2020-05-15 14:24:18 +0200 |
commit | 072e97d5de3f147aef1eae41222385352fb8df73 (patch) | |
tree | 6a324c62d8b2cb8990adc8392e159d03872dab53 /plugins/tests/check_http.t | |
parent | 53e6f2970dcbabd41d55d87b2e7623a86fe48ec9 (diff) | |
download | monitoring-plugins-072e97d5de3f147aef1eae41222385352fb8df73.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 fe65325c..2f051fad 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 |
@@ -211,7 +213,7 @@ SKIP: { | |||
211 | $result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" ); | 213 | $result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" ); |
212 | is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" ); | 214 | is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" ); |
213 | is( $result->output, | 215 | is( $result->output, |
214 | 'CRITICAL - Certificate \'Ton Voon\' expired on Thu Mar 5 00:13:16 2009 +0000.', | 216 | 'CRITICAL - Certificate \'Monitoring Plugins\' expired on Wed Jan 2 11:00:26 2008 +0000.', |
215 | "output ok" ); | 217 | "output ok" ); |
216 | 218 | ||
217 | } | 219 | } |