Ejemplo n.º 1
0
            public SniMappingListViewItem(SniMappingItem item, HttpApiPage page)
                : base(item.Host)
            {
                Item  = item;
                _page = page;
                SubItems.Add(new ListViewSubItem(this, item.Port));
                SubItems.Add(new ListViewSubItem(this, BindingUtility.GetAppName(item.AppId)));
                SubItems.Add(new ListViewSubItem(this, item.AppId));
                SubItems.Add(new ListViewSubItem(this, item.Hash));
                SubItems.Add(new ListViewSubItem(this, item.Store));

                string flag = "Broken";

                using X509Store personal = new X509Store(item.Store, StoreLocation.LocalMachine);
                try
                {
                    personal.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly);
                    var found = personal.Certificates.Find(X509FindType.FindByThumbprint, item.Hash, false);
                    if (found.Count > 0)
                    {
                        flag = "Healthy";
                    }

                    personal.Close();
                }
                catch (CryptographicException)
                {
                    flag = "Unknown";
                }

                SubItems.Add(new ListViewSubItem(this, flag));
            }
Ejemplo n.º 2
0
 public SniMappingListViewItem(SniMappingItem item, HttpApiPage page)
     : base(item.Host)
 {
     Item  = item;
     _page = page;
     SubItems.Add(new ListViewSubItem(this, item.Port));
     SubItems.Add(new ListViewSubItem(this, BindingUtility.GetAppName(item.AppId)));
     SubItems.Add(new ListViewSubItem(this, item.AppId));
     SubItems.Add(new ListViewSubItem(this, item.Hash));
     SubItems.Add(new ListViewSubItem(this, item.Store));
 }
Ejemplo n.º 3
0
 public SniMappingListViewItem(SniMappingItem item, HttpApiPage page)
     : base(item.Host)
 {
     this.Item = item;
     _page     = page;
     this.SubItems.Add(new ListViewSubItem(this, item.Port));
     this.SubItems.Add(new ListViewSubItem(this, BindingExtensions.GetAppName(item.AppId)));
     this.SubItems.Add(new ListViewSubItem(this, item.AppId));
     this.SubItems.Add(new ListViewSubItem(this, item.Hash));
     this.SubItems.Add(new ListViewSubItem(this, item.Store));
 }