diff --git a/.werks/17277.md b/.werks/17277.md new file mode 100644 index 00000000000..b91a9efd774 --- /dev/null +++ b/.werks/17277.md @@ -0,0 +1,17 @@ +[//]: # (werk v2) +# check-cert: Fix checking of public key size + +key | value +---------- | --- +date | 2024-12-12T12:46:13+00:00 +version | 2.4.0b1 +class | fix +edition | cre +component | checks +level | 1 +compatible | yes + +When configuring to check the public key size of the certificate. +check-cert would just ignore this configuration option. + +Now the checking works as expected. diff --git a/cmk/plugins/collection/server_side_calls/cert.py b/cmk/plugins/collection/server_side_calls/cert.py index bd1dda10dd9..cab5ca108ff 100644 --- a/cmk/plugins/collection/server_side_calls/cert.py +++ b/cmk/plugins/collection/server_side_calls/cert.py @@ -57,7 +57,7 @@ class Subject(BaseModel): organization: str | None = None org_unit: str | None = None pubkey_algorithm: PubKey | None = None - pubkey_size: str | None = None + pubkeysize: str | None = None class Certificate(BaseModel): @@ -231,7 +231,7 @@ def _subject_args(subject: Subject, host_config: HostConfig) -> Iterator[str]: if (pubkey := subject.pubkey_algorithm) is not None: yield "--pubkey-algorithm" yield pubkey[0] - if (pubkey_size := subject.pubkey_size) is not None: + if (pubkey_size := subject.pubkeysize) is not None: yield "--pubkey-size" yield replace_macros(pubkey_size, host_config.macros)