From 47d65a191c6549226fe3bff6c73950b0d420aa33 Mon Sep 17 00:00:00 2001 From: Didier 'OdyX' Raboud Date: Mon, 8 May 2023 16:37:37 +0200 Subject: [PATCH] ssl_cert: replace deprecated -n with --match Fixes https://github.com/Icinga/icinga2/issues/9661 --- doc/10-icinga-template-library.md | 2 +- itl/plugins-contrib.d/web.conf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/10-icinga-template-library.md b/doc/10-icinga-template-library.md index b8775c74b..5100f582a 100644 --- a/doc/10-icinga-template-library.md +++ b/doc/10-icinga-template-library.md @@ -5784,7 +5784,7 @@ ssl_cert_proxy | **Optional.** Proxy server to use for connecting ssl_cert_file | **Optional.** Local file path. Works only if `ssl_cert_address` is set to "localhost". ssl_cert_warn | **Optional.** Minimum number of days a certificate has to be valid. ssl_cert_critical | **Optional.** Minimum number of days a certificate has to be valid to issue a critical status. -ssl_cert_cn | **Optional.** Pattern to match the CN of the certificate. +ssl_cert_cn | **Optional.** Pattern to match the CN or AltName of the certificate. ssl_cert_altnames | **Optional.** Matches the pattern specified in -n with alternate ssl_cert_issuer | **Optional.** Pattern to match the issuer of the certificate. ssl_cert_org | **Optional.** Pattern to match the organization of the certificate. diff --git a/itl/plugins-contrib.d/web.conf b/itl/plugins-contrib.d/web.conf index f5e65d5a1..c2739c071 100644 --- a/itl/plugins-contrib.d/web.conf +++ b/itl/plugins-contrib.d/web.conf @@ -396,9 +396,9 @@ object CheckCommand "ssl_cert" { value = "$ssl_cert_critical$" description = "Minimum number of days a certificate has to be valid to issue a critical status" } - "-n" = { + "--match" = { value = "$ssl_cert_cn$" - description = "Pattern to match the CN of the certificate" + description = "Pattern to match the CN or AltNames of the certificate" } "--altnames" = { set_if = "$ssl_cert_altnames$"