@@ -414,38 +414,24 @@ testIPCN() {
414414 assertEquals " wrong exit code" " ${NAGIOS_CRITICAL} " " ${EXIT_CODE} "
415415}
416416
417- testETHZWildCard () {
417+ testWildCard () {
418418 # * should not match, see https://serverfault.com/questions/310530/should-a-wildcard-ssl-certificate-secure-both-the-root-domain-as-well-as-the-sub
419- # we ignore the altnames as sp.ethz.ch is listed
419+ # we ignore the altnames as google.com is listed
420420 # shellcheck disable=SC2086
421- ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt -H sherlock.sp.ethz.ch --match sp.ethz.ch --ignore-altnames --ignore-exp
421+ ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt -H maps.google.com --match google.com --ignore-altnames --ignore-exp
422422 EXIT_CODE=$?
423423 assertEquals " wrong exit code" " ${NAGIOS_CRITICAL} " " ${EXIT_CODE} "
424424}
425425
426- testETHZWildCardCaseInsensitive () {
426+ testWildCardCaseInsensitive () {
427427 # * should not match, see https://serverfault.com/questions/310530/should-a-wildcard-ssl-certificate-secure-both-the-root-domain-as-well-as-the-sub
428- # we ignore the altnames as sp.ethz.ch is listed
428+ # we ignore the altnames as google.com is listed
429429 # shellcheck disable=SC2086
430- ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt -H sherlock.sp.ethz.ch --match SP.ETHZ.CH --ignore-altnames --ignore-exp
430+ ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt -H maps.google.com --match GOOGLE.COM --ignore-altnames --ignore-exp
431431 EXIT_CODE=$?
432432 assertEquals " wrong exit code" " ${NAGIOS_CRITICAL} " " ${EXIT_CODE} "
433433}
434434
435- testETHZWildCardSub () {
436- # shellcheck disable=SC2086
437- ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt -H sherlock.sp.ethz.ch --match sub.sp.ethz.ch --ignore-exp
438- EXIT_CODE=$?
439- assertEquals " wrong exit code" " ${NAGIOS_OK} " " ${EXIT_CODE} "
440- }
441-
442- testETHZWildCardSubCaseInsensitive () {
443- # shellcheck disable=SC2086
444- ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt -H sherlock.sp.ethz.ch --match SUB.SP.ETHZ.CH --ignore-exp
445- EXIT_CODE=$?
446- assertEquals " wrong exit code" " ${NAGIOS_OK} " " ${EXIT_CODE} "
447- }
448-
449435testRootIssuer () {
450436 # shellcheck disable=SC2086
451437 ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt -H github.com --issuer ' Sectigo Limited' --ignore-exp
@@ -478,20 +464,7 @@ testAltNames() {
478464# Do not require to match Alternative Name if CN already matched
479465testWildcardAltNames1 () {
480466 # shellcheck disable=SC2086
481- ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt -H sherlock.sp.ethz.ch --ignore-exp
482- EXIT_CODE=$?
483- assertEquals " wrong exit code" " ${NAGIOS_OK} " " ${EXIT_CODE} "
484- }
485-
486- # Check for wildcard support in Alternative Names
487- testWildcardAltNames2 () {
488- # shellcheck disable=SC2086
489- ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt -H sherlock.sp.ethz.ch \
490- --match somehost.spapps.ethz.ch \
491- --match otherhost.sPaPPs.ethz.ch \
492- --match spapps.ethz.ch \
493- --ignore-exp
494-
467+ ${SCRIPT} ${TEST_DEBUG} --rootcert-file cabundle.crt -H maps.google.com --ignore-exp
495468 EXIT_CODE=$?
496469 assertEquals " wrong exit code" " ${NAGIOS_OK} " " ${EXIT_CODE} "
497470}
0 commit comments