Added support for managed custom root certificate bundles (#784)
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-05-31 18:46:54 +02:00
1 parent def685d2c2
commit e27cd27dba
44 files changed
+1150 -40

No files matched your search

+24 -1
View File
@@ -147,9 +147,32 @@
</MudButton>
}
</MudListItem>
@if (ExternalHttpClientTimeout.CustomRootCertificateState.IsEnabled)
{
<MudListItem T="string" Icon="@Icons.Material.Outlined.Security">
<MudText Typo="Typo.body1">
@(ExternalHttpClientTimeout.CustomRootCertificateState.IsUsable
? T("External HTTPS custom root certificates are active.")
: T("External HTTPS custom root certificates are configured but not active."))
</MudText>
<MudCollapse Expanded="@this.showExternalHttpCustomRootCertificateDetails">
<ConfigPluginInfoCard HeaderIcon="@Icons.Material.Filled.Security"
HeaderText="@T("External HTTPS custom root certificates")"
Items="@this.BuildExternalHttpCustomRootCertificateItems()"
ShowWarning="@(!ExternalHttpClientTimeout.CustomRootCertificateState.IsUsable)"
WarningText="@this.ExternalHttpCustomRootCertificateWarningText"/>
</MudCollapse>
<MudButton StartIcon="@(this.showExternalHttpCustomRootCertificateDetails ? Icons.Material.Filled.ExpandLess : Icons.Material.Filled.ExpandMore)"
Size="Size.Small"
Variant="Variant.Text"
OnClick="@this.ToggleExternalHttpCustomRootCertificateDetails">
@(this.showExternalHttpCustomRootCertificateDetails ? T("Hide Details") : T("Show Details"))
</MudButton>
</MudListItem>
}
</MudList>
<MudStack Row="true">
<MudButton Variant="Variant.Filled" Color="Color.Info" StartIcon="@Icons.Material.Filled.Update" OnClick="@(() => this.CheckForUpdate())">
<MudButton Variant="Variant.Filled" Color="Color.Info" StartIcon="@Icons.Material.Filled.Update" OnClick="@this.CheckForUpdate">
@T("Check for updates")
</MudButton>
<MudButton Variant="Variant.Filled" Color="Color.Default" StartIcon="@Icons.Material.Filled.Download" OnClick="@(async () => await this.ShowPandocDialog())">
@@ -85,6 +85,8 @@ public partial class Information : MSGComponentBase
private bool showEnterpriseConfigDetails;
private bool showExternalHttpCustomRootCertificateDetails;
private bool showDatabaseDetails;
private List<IAvailablePlugin> configPlugins = PluginFactory.AvailablePlugins
@@ -248,6 +250,11 @@ public partial class Information : MSGComponentBase
{
this.showEnterpriseConfigDetails = !this.showEnterpriseConfigDetails;
}
private void ToggleExternalHttpCustomRootCertificateDetails()
{
this.showExternalHttpCustomRootCertificateDetails = !this.showExternalHttpCustomRootCertificateDetails;
}
private void ToggleDatabaseDetails()
{
@@ -378,6 +385,78 @@ public partial class Information : MSGComponentBase
return plugin.ManagedConfigurationId == configurationId && plugin.Id != configurationId;
}
private string ExternalHttpCustomRootCertificateWarningText
{
get
{
var state = ExternalHttpClientTimeout.CustomRootCertificateState;
return string.IsNullOrWhiteSpace(state.Issue)
? T("The configured root certificates could not be used.")
: state.Issue;
}
}
private IReadOnlyList<ConfigInfoRowItem> BuildExternalHttpCustomRootCertificateItems()
{
var state = ExternalHttpClientTimeout.CustomRootCertificateState;
var items = new List<ConfigInfoRowItem>
{
new(Icons.Material.Filled.ArrowRightAlt,
$"{T("Status:")} {(state.IsUsable ? T("active") : T("not active"))}",
state.IsUsable ? T("active") : T("not active"),
T("Copies the status to the clipboard")),
new(Icons.Material.Filled.ArrowRightAlt,
$"{T("Configuration source:")} {state.Source}",
state.Source,
T("Copies the configuration source to the clipboard"),
"margin-top: 4px;"),
new(Icons.Material.Filled.ArrowRightAlt,
$"{T("Certificate bundle:")} {state.BundlePath}",
state.BundlePath,
T("Copies the certificate bundle path to the clipboard"),
"margin-top: 4px;"),
new(Icons.Material.Filled.ArrowRightAlt,
$"{T("Loaded root certificates:")} {state.CertificateCount}",
state.CertificateCount.ToString(),
T("Copies the number of loaded root certificates to the clipboard"),
"margin-top: 4px;")
};
if (state.AllowedHostPatterns.Count == 0)
{
items.Add(new ConfigInfoRowItem(Icons.Material.Filled.ArrowRightAlt,
T("Allowed hosts: none configured"),
string.Empty,
T("Copies the allowed host configuration to the clipboard"),
"margin-top: 4px;"));
}
else
{
foreach (var allowedHostPattern in state.AllowedHostPatterns)
{
items.Add(new ConfigInfoRowItem(Icons.Material.Filled.Dns,
$"{T("Allowed host:")} {allowedHostPattern}",
allowedHostPattern,
T("Copies the allowed host pattern to the clipboard"),
"margin-top: 4px;"));
}
}
foreach (var fingerprint in state.CertificateFingerprints)
{
items.Add(new ConfigInfoRowItem(Icons.Material.Filled.Fingerprint,
$"{T("Root certificate fingerprint:")} {fingerprint}",
fingerprint,
T("Copies the root certificate fingerprint to the clipboard"),
"margin-top: 4px;"));
}
return items;
}
protected override void DisposeResources()
{
this.databaseRefreshCancellationTokenSource?.Cancel();