void PopulateCertList(TElCustomCertStorage certStorage) { Cursor = Cursors.WaitCursor; //int i = 0; for (int i = 0; i < certStorage.Count; i++) { TElX509Certificate Cert = certStorage.get_Certificates(i); TElCertificateExtensions extension = new TElCertificateExtensions(); extension = Cert.Extensions; //zjistím ostatní extension int count_other = 0; count_other = extension.OtherCount; if (count_other >= 0) { for (int ic = 0; ic < count_other; ic++) { TElCustomExtension xxxv = Cert.Extensions.get_OtherExtensions(ic); string ccc = SBStrUtils.Unit.OIDToStr(xxxv.OID); if (ccc == "1.3.6.1.5.5.7.1.3") { //mam element qcStatements int typ_kvalifikovaneho_prostredku = 0; if (over_certifikat(xxxv.Value, ref typ_kvalifikovaneho_prostredku)) { dataGridView1.Rows.Add(Cert.SubjectName.CommonName, Cert.IssuerName.CommonName, Convert.ToDateTime(Cert.ValidTo), "", SBUtils.Unit.BinaryToString(Cert.SerialNumber), i); } } } } } Cursor = Cursors.Default; if (dataGridView1.RowCount > 0) { dataGridView1.Sort(dataGridViewTextBoxColumn3, ListSortDirection.Ascending); dataGridView1.ClearSelection(); button3.Enabled = true; } }
private void BeforeSign_Handler(object Sender, TElCMSSignature Signature, TElX509Certificate Certificate, TElCustomCertStorage Chain) { var test = Certificate.SubjectName; }