@@ -354,20 +354,6 @@ testSignatureAlgorithms() {
354
354
sed ' s/^Signature algorithm *//' )
355
355
assertEquals " wrong signature algorithm" ' sha256WithRSAEncryption (8192 bit)' " ${ALGORITHM} "
356
356
357
- echo " testing sha256WithRSAEncryption (256 bit)"
358
- # shellcheck disable=SC2086
359
- ALGORITHM=$( ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt --info --ignore-exp --host ecc256.badssl.com |
360
- grep ' ^Signature algorithm' |
361
- sed ' s/^Signature algorithm *//' )
362
- assertEquals " wrong signature algorithm" ' sha256WithRSAEncryption (256 bit)' " ${ALGORITHM} "
363
-
364
- echo " testing sha256WithRSAEncryption (384 bit)"
365
- # shellcheck disable=SC2086
366
- ALGORITHM=$( ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt --info --ignore-exp --host ecc384.badssl.com |
367
- grep ' ^Signature algorithm' |
368
- sed ' s/^Signature algorithm *//' )
369
- assertEquals " wrong signature algorithm" ' sha256WithRSAEncryption (384 bit)' " ${ALGORITHM} "
370
-
371
357
}
372
358
373
359
testFQDN () {
@@ -1051,13 +1037,13 @@ testNotExistingHosts() {
1051
1037
if [ -n " ${NSLOOKUP_BIN} " ] ; then
1052
1038
1053
1039
# shellcheck disable=SC2086
1054
- OUTPUT=$( ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt --host li )
1040
+ OUTPUT=$( ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt --host nonexistinghostordomain )
1055
1041
EXIT_CODE=$?
1056
1042
assertEquals " wrong exit code" " ${NAGIOS_CRITICAL} " " ${EXIT_CODE} "
1057
1043
assertContains " wrong error message" " ${OUTPUT} " " Cannot resolve"
1058
1044
1059
1045
# shellcheck disable=SC2086
1060
- OUTPUT=$( ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt --host li --do-not-resolve )
1046
+ OUTPUT=$( ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt --host nonexistinghostordomain --do-not-resolve )
1061
1047
EXIT_CODE=$?
1062
1048
assertEquals " wrong exit code" " ${NAGIOS_CRITICAL} " " ${EXIT_CODE} "
1063
1049
assertContains " wrong error message" " ${OUTPUT} " " Cannot connect"
@@ -1309,7 +1295,6 @@ testGithubComCRL() {
1309
1295
create_temporary_test_file
1310
1296
TEMPFILE_CRL=${TEMPFILE}
1311
1297
1312
- echo " ${TEST_CRL_URI} "
1313
1298
curl --silent " ${TEST_CRL_URI} " --output " ${TEMPFILE_CRL} "
1314
1299
1315
1300
# shellcheck disable=SC2086
@@ -1593,6 +1578,12 @@ testXFrameOptionsFailed() {
1593
1578
assertEquals " wrong exit code" " ${NAGIOS_CRITICAL} " " ${EXIT_CODE} "
1594
1579
}
1595
1580
1581
+ testHTTPHeaders () {
1582
+ # shellcheck disable=SC2086
1583
+ ${SCRIPT} ${TEST_DEBUG} -H securityheaders.com --ignore-exp --debug-headers
1584
+ }
1585
+
1586
+
1596
1587
testHTTPHeadersOK () {
1597
1588
# shellcheck disable=SC2086
1598
1589
${SCRIPT} ${TEST_DEBUG} -H securityheaders.com --ignore-exp --require-security-headers
0 commit comments