diff --git a/doc/31-Changelog.md b/doc/31-Changelog.md index b0cc88e0..8c1a18c6 100644 --- a/doc/31-Changelog.md +++ b/doc/31-Changelog.md @@ -41,6 +41,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic * [#143](https://github.com/Icinga/icinga-powershell-framework/issues/143) Fixes the annoying hint from the analyzer to check space before open brace * [#152](https://github.com/Icinga/icinga-powershell-framework/issues/152) Fixes incorrect rendering for empty arrays which used `$null` incorrectly instead of `@()` and fixed ValidateSet which now also supports arrays as data type * [#159](https://github.com/Icinga/icinga-powershell-framework/pull/159) Fixes crash during update of the Icinga Framework, caused by the newly introduced experimental feature for code caching +* [#165](https://github.com/Icinga/icinga-powershell-framework/pull/165) Fixes fetching for Icinga Agent certificate for REST-Api daemon on upper/lower case hostname mismatch ## 1.2.0 (2020-08-28) diff --git a/lib/core/icingaagent/getters/Get-IcingaAgentHostCertificate.psm1 b/lib/core/icingaagent/getters/Get-IcingaAgentHostCertificate.psm1 index 8b868938..027461d7 100644 --- a/lib/core/icingaagent/getters/Get-IcingaAgentHostCertificate.psm1 +++ b/lib/core/icingaagent/getters/Get-IcingaAgentHostCertificate.psm1 @@ -7,7 +7,7 @@ function Get-IcingaAgentHostCertificate() $CertPath = $null; foreach ($certFile in $FolderContent) { - if ($certFile.Name.Contains($Hostname)) { + if ($certFile.Name -like ([string]::Format('{0}.crt', $Hostname))) { $CertPath = $certFile.FullName; break; }