ssl_cert: replace deprecated -n with --match

Fixes https://github.com/Icinga/icinga2/issues/9661
This commit is contained in:
Didier 'OdyX' Raboud 2023-05-08 16:37:37 +02:00
parent b4ce16c488
commit 47d65a191c
No known key found for this signature in database
GPG Key ID: EA830BC6A684CD7C
2 changed files with 3 additions and 3 deletions

View File

@ -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_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_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_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_altnames | **Optional.** Matches the pattern specified in -n with alternate
ssl_cert_issuer | **Optional.** Pattern to match the issuer of the certificate. ssl_cert_issuer | **Optional.** Pattern to match the issuer of the certificate.
ssl_cert_org | **Optional.** Pattern to match the organization of the certificate. ssl_cert_org | **Optional.** Pattern to match the organization of the certificate.

View File

@ -396,9 +396,9 @@ object CheckCommand "ssl_cert" {
value = "$ssl_cert_critical$" value = "$ssl_cert_critical$"
description = "Minimum number of days a certificate has to be valid to issue a critical status" description = "Minimum number of days a certificate has to be valid to issue a critical status"
} }
"-n" = { "--match" = {
value = "$ssl_cert_cn$" 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" = { "--altnames" = {
set_if = "$ssl_cert_altnames$" set_if = "$ssl_cert_altnames$"