aboutsummaryrefslogtreecommitdiff
path: root/plugins/tests/check_http.t
diff options
context:
space:
mode:
authorGravatar Sven Nierlein <sven@nierlein.de> 2020-05-15 13:33:48 +0200
committerGravatar Sven Nierlein <sven@nierlein.de> 2020-05-15 14:24:18 +0200
commit072e97d5de3f147aef1eae41222385352fb8df73 (patch)
tree6a324c62d8b2cb8990adc8392e159d03872dab53 /plugins/tests/check_http.t
parent53e6f2970dcbabd41d55d87b2e7623a86fe48ec9 (diff)
downloadmonitoring-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-xplugins/tests/check_http.t4
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 @@
#
# To create the https server certificate:
# openssl req -new -x509 -keyout server-key.pem -out server-cert.pem -days 3650 -nodes
+# to create a new expired certificate:
+# faketime '2008-01-01 12:00:00' openssl req -new -x509 -keyout expired-key.pem -out expired-cert.pem -days 1 -nodes
# Country Name (2 letter code) [AU]:DE
# State or Province Name (full name) [Some-State]:Bavaria
# Locality Name (eg, city) []:Munich
@@ -211,7 +213,7 @@ SKIP: {
$result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" );
is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" );
is( $result->output,
- 'CRITICAL - Certificate \'Ton Voon\' expired on Thu Mar 5 00:13:16 2009 +0000.',
+ 'CRITICAL - Certificate \'Monitoring Plugins\' expired on Wed Jan 2 11:00:26 2008 +0000.',
"output ok" );
}