Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/100-General/10-Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
* [#796](https://github.com/Icinga/icinga-powershell-framework/issues/796) [#798](https://github.com/Icinga/icinga-powershell-framework/issues/798) Fixes an issue with the new check handling, which did not properly convert values from checks to the correct performance data values and base values in some cases
* [#797](https://github.com/Icinga/icinga-powershell-framework/issues/797) Fixes plugins throwing `UNKNOWN` in case `-TresholdInterval` is used for Metrics over Time, when checks are newly registered and checked, before the first MoT is executed and collected

### Enhancements

* [#810](https://github.com/Icinga/icinga-powershell-framework/pull/810) Adds support to suppress messages for `Disable-IcingaUntrustedCertificateValidation`

## 1.13.3 (tbd)

* [#800](https://github.com/Icinga/icinga-powershell-framework/pull/800) Fixes an issue for certain plugins, like `Invoke-IcingaCheckProcess`, which reports unknown if MetricsOverTime is used for checks that do not write performance data
Expand Down
20 changes: 14 additions & 6 deletions lib/webserver/Disable-IcingaUntrustedCertificateValidation.psm1
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
function Disable-IcingaUntrustedCertificateValidation()
{
param (
[switch]$SuppressMessages = $FALSE
);

try {
[System.Net.ServicePointManager]::CertificatePolicy = $null;

Write-IcingaConsoleNotice 'Successfully disabled untrusted certificate validation for this shell instance';
if ($SuppressMessages -eq $FALSE) {
Write-IcingaConsoleNotice 'Successfully disabled untrusted certificate validation for this shell instance';
}
} catch {
Write-IcingaConsoleError (
[string]::Format(
'Failed to disable untrusted certificate policy: {0}', $_.Exception.Message
)
);
if ($SuppressMessages -eq $FALSE) {
Write-IcingaConsoleError (
[string]::Format(
'Failed to disable untrusted certificate policy: {0}', $_.Exception.Message
)
);
}
}
}