Fix Agent certificate fetching for REST-Api

This commit is contained in:
Lord Hepipud 2020-11-24 13:52:37 +01:00
parent 348fa773fd
commit 0aa1d57745
2 changed files with 2 additions and 1 deletions

View file

@ -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)

View file

@ -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;
}