diff --git a/lib/web/ConvertTo-IcingaX509Certificate.psm1 b/lib/web/ConvertTo-IcingaX509Certificate.psm1 index d1c4e44..b3a4915 100644 --- a/lib/web/ConvertTo-IcingaX509Certificate.psm1 +++ b/lib/web/ConvertTo-IcingaX509Certificate.psm1 @@ -37,9 +37,17 @@ function ConvertTo-IcingaX509Certificate() # it is a temp file or we force its creation if (-Not (Test-Path $TargetFile) -Or $TempFile -Or $Force) { Write-Output "$Password - $Password" | certutil -mergepfx "$CertFile" "$TargetFile" | Out-Null; + $Password" | certutil -mergepfx "$CertFile" "$TargetFile" | Set-Variable -Name 'CertUtilOutput'; } + Write-IcingaDebugMessage -Message ( + [string]::Format( + 'Certutil merge request has been completed. Certutil message:{0}{0}{1}', + (New-IcingaNewLine), + $CertUtilOutput + ) + ); + # If no target file exists afterwards (a valid PFX certificate) # then throw an exception if (-Not (Test-Path $TargetFile)) {