private static void AllCertificiateStatus() { Console.WriteLine("Getting all our own certificates ..."); var res = PKIClient.GetClientCertificateList(KeyGeneratorTypeType.software); if (!CheckForError(res)) { exitProgram(Int32.Parse(res.Error.ReturnCode)); } foreach (var certStatus in res.Response.GetOwnCertificateListResponse.CertificateStatus) { PrintCertInfo(certStatus); } Console.WriteLine("Total certificates: " + res.Response.GetOwnCertificateListResponse.CertificateStatus.Length); }
private static void GetOwnCertificiateList(PKIClient client) { var res = client.GetClientCertificateList(KeyGeneratorTypeType.software); if (!CheckForError(res)) { return; } foreach (var certStatus in res.Response.GetOwnCertificateListResponse.CertificateStatus) { Console.WriteLine("Certificate:"); Console.WriteLine(" - Serial: " + certStatus.CertificateSerialNo); Console.WriteLine(" - CertificateType: " + certStatus.CertificateType); Console.WriteLine(" - MatchingSerial: " + certStatus.MatchingCertificateSerialNo); Console.WriteLine(" - Status: " + certStatus.Status); } }