Skip to content

Commit f0c67d3

Browse files
committed
Adds support to TLS1.3 and improves startup response
1 parent 0c08e5f commit f0c67d3

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

doc/100-General/10-Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
1111

1212
[Issues and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/32)
1313

14+
* [#732](https://github.com/Icinga/icinga-powershell-framework/pull/732) Adds support for TLS 1.3 and improves startup response
15+
1416
## 1.12.3 (2024-04-24)
1517

1618
[Issues and PRs](https://github.com/Icinga/icinga-powershell-framework/milestone/35)

lib/daemons/RestAPI/daemon/New-IcingaForWindowsRESTApi.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ function New-IcingaForWindowsRESTApi()
121121
Write-IcingaDebugMessage -Message 'Scheduling Icinga for Windows API request' -Objects 'REST-Thread Id', $NextRESTApiThreadId;
122122

123123
if ($Global:Icinga.Public.Daemons.RESTApi.ApiRequests.ContainsKey($NextRESTApiThreadId) -eq $FALSE) {
124-
Close-IcingaTCPConnection -Connection $Connection;
125-
$Connection = $null;
126-
continue;
124+
# Ensure we allow API calls to be executed even in case not all threads are loaded
125+
# This will increase responsiveness of the API
126+
$NextRESTApiThreadId = 0;
127127
}
128128

129129
$Global:Icinga.Public.Daemons.RESTApi.ApiRequests.$NextRESTApiThreadId.Add($Connection);

lib/webserver/New-IcingaSSLStream.psm1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ function New-IcingaSSLStream()
1212
[System.Net.Security.SslStream]$SSLStream = $null;
1313

1414
try {
15-
$SSLStream = New-Object System.Net.Security.SslStream($Client.GetStream(), $false);
16-
$SSLStream.AuthenticateAsServer($Certificate, $false, [System.Security.Authentication.SslProtocols]::Tls12, $true) | Out-Null;
15+
$SSLStream = New-Object System.Net.Security.SslStream($Client.GetStream(), $false);
16+
$TLSProtocols = [System.Security.Authentication.SslProtocols]::Tls12 -bor [System.Security.Authentication.SslProtocols]::Tls13;
17+
$SSLStream.AuthenticateAsServer($Certificate, $false, $TLSProtocols, $true) | Out-Null;
1718
} catch {
1819
if ($null -ne $SSLStream) {
1920
$SSLStream.Close();

0 commit comments

Comments
 (0)