public GenerateKeysDialog(Pkcs11Slot pkcs11Slot) { InitializeComponent(); this.Icon = Properties.Resources.Pkcs11Admin; if (pkcs11Slot == null) { throw new ArgumentNullException("pkcs11Slot"); } _pkcs11Slot = pkcs11Slot; List <CKK> asymKeyTypes = pkcs11Slot.GetGeneratableAsymmetricKeyTypes(); foreach (CKK asymKeyType in asymKeyTypes) { ComboBoxKeyType.Items.Add(new ComboBoxKeyTypeItem(asymKeyType, ComboBoxKeyTypeItem.Kinds.Asymmetric)); } List <CKK> symKeyTypes = pkcs11Slot.GetGeneratableSymmetricKeyTypes(); foreach (CKK symKeyType in symKeyTypes) { ComboBoxKeyType.Items.Add(new ComboBoxKeyTypeItem(symKeyType, ComboBoxKeyTypeItem.Kinds.Symmetric)); } }
public CreateObjectDialog(Pkcs11Slot pkcs11Slot, List <Tuple <ObjectAttribute, ClassAttribute> > objectAttributes) { InitializeComponent(); this.Icon = Properties.Resources.Pkcs11Admin; if (pkcs11Slot == null) { throw new ArgumentNullException("pkcs11Slot"); } if (objectAttributes == null) { throw new ArgumentNullException("objectAttributes"); } _pkcs11Slot = pkcs11Slot; // Add items to ListView and set the tags foreach (Tuple <ObjectAttribute, ClassAttribute> objectAttribute in objectAttributes) { ListViewItem listViewItem = new ListViewItem(); listViewItem.Tag = objectAttribute.Item1; listViewItem.Checked = objectAttribute.Item2.CreateSetByDefault; ListViewAttributes.Items.Add(listViewItem); } ReloadListView(); }
public EditObjectDialog(Pkcs11Slot pkcs11Slot, Pkcs11ObjectInfo pkcs11ObjectInfo) { InitializeComponent(); this.Icon = Properties.Resources.Pkcs11Admin; if (pkcs11Slot == null) { throw new ArgumentNullException("pkcs11Slot"); } if (pkcs11ObjectInfo == null) { throw new ArgumentNullException("pkcs11Objectinfo"); } _pkcs11Slot = pkcs11Slot; _pkcs11ObjectInfo = pkcs11ObjectInfo; AttributeModified = false; // Add items to ListView and set the tags foreach (IObjectAttribute objectAttribute in _pkcs11ObjectInfo.ObjectAttributes) { ListViewItem listViewItem = new ListViewItem(); listViewItem.Tag = objectAttribute; ListViewAttributes.Items.Add(listViewItem); } ReloadListView(); }
public InitTokenDialog(Pkcs11Slot slot) { InitializeComponent(); this.Icon = Properties.Resources.Pkcs11Admin; _slot = slot; UpdateStatusStrip(); }
public UriDialog(Pkcs11Library pkcs11Library, Pkcs11Slot pkcs11Slot, Pkcs11ObjectInfo pkcs11ObjectInfo) { InitializeComponent(); this.Icon = Properties.Resources.Pkcs11Admin; _pkcs11Library = pkcs11Library; _pkcs11Slot = pkcs11Slot; _pkcs11ObjectInfo = pkcs11ObjectInfo; RefreshUri(); }
public ReInitTokenDialog(Pkcs11Slot slot) { InitializeComponent(); this.Icon = Properties.Resources.Pkcs11Admin; _slot = slot; TextBoxTokenLabel.Text = _slot.TokenInfo.Label; UpdateStatusStrip(); }
public ChangePinDialog(Pkcs11Slot slot, CKU userType) { InitializeComponent(); this.Icon = Properties.Resources.Pkcs11Admin; _slot = slot; _userType = userType; Text = ((_userType == CKU.CKU_USER) || (_userType == CKU.CKU_CONTEXT_SPECIFIC)) ? "Change user PIN" : "Change SO PIN"; UpdateStatusStrip(); }
public ProtectedInitTokenDialog(Pkcs11Slot slot) { InitializeComponent(); this.Icon = Properties.Resources.Pkcs11Admin; _slot = slot; if (!slot.TokenInfo.TokenInitialized) { Text = "Initialize token/card"; } else { Text = "Reinitialize token/card"; TextBoxTokenLabel.Text = slot.TokenInfo.Label; } UpdateStatusStrip(); }
public CsrDialog(Pkcs11Slot pkcs11Slot, Pkcs11KeyInfo privKeyInfo, Pkcs11KeyInfo pubKeyInfo) { InitializeComponent(); this.Icon = Properties.Resources.Pkcs11Admin; if (pkcs11Slot == null) { throw new ArgumentNullException(nameof(pkcs11Slot)); } if (privKeyInfo == null) { throw new ArgumentNullException(nameof(privKeyInfo)); } _pkcs11Slot = pkcs11Slot; _privKeyInfo = privKeyInfo; _pubKeyInfo = pubKeyInfo; SetupComboBoxType(); }