Skip to content

Commit

Permalink
GDS: Make Push Client support TrustListMasks (#594)
Browse files Browse the repository at this point in the history
* support TrustListMasks
* fix dropdown width
  • Loading branch information
romanett authored Mar 11, 2024
1 parent e100ac7 commit 2f0ffba
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 31 deletions.
109 changes: 79 additions & 30 deletions Samples/GDS/Client/Controls/ApplicationTrustListControl.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion Samples/GDS/Client/Controls/ApplicationTrustListControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public partial class ApplicationTrustListControl : UserControl
public ApplicationTrustListControl()
{
InitializeComponent();
TrustListMasksComboBox.DataSource = Enum.GetValues(typeof(TrustListMasks));
TrustListMasksComboBox.SelectedItem = TrustListMasks.All;
}

private GlobalDiscoveryServerClient m_gds;
Expand Down Expand Up @@ -77,7 +79,11 @@ private void ReloadTrustListButton_Click(object sender, EventArgs e)
{
if (m_application.RegistrationType == RegistrationType.ServerPush)
{
var trustList = m_server.ReadTrustList();
TrustListMasks masks;

if (!Enum.TryParse(TrustListMasksComboBox.SelectedItem.ToString(), out masks))
masks = TrustListMasks.All;
var trustList = m_server.ReadTrustList(masks);
var rejectedList = m_server.GetRejectedList();
CertificateStoreControl.Initialize(trustList, rejectedList, true);
}
Expand Down
3 changes: 3 additions & 0 deletions Samples/GDS/Client/Controls/ApplicationTrustListControl.resx
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,7 @@
<metadata name="ToolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="ToolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

0 comments on commit 2f0ffba

Please sign in to comment.