X509 Certificate Extensions

My client has ASCII info buried in the Extensions section of the certificates he creates and wants that stuff displayed in my Delphi written program, I haven't been able to find a property to get to the Extensions with the X509 Certificate class, if you have an example that would be nice!!!!

Try to reuse the code in TX509Certificate.ExtractIssuerSerialV2 in a new procedure of your own.

This gives you the full content of the cert: CertificateContent := conv.FormatToChar(self.FCrtStr);

You need to parse CertificateContent to extract the extensions and other data.

In C# Visual Studio world its easy, the X509Certificate2 breaks it all out. Ill just add it to the C# DLL that I call that does all things easy in C# not easy in Delphi.

else if (x509Certificate2.Extensions[i].Oid.Value.ToString() == "")
serial_mask_length = x509Certificate2.Extensions[i].RawData[1];

                                Array.Copy(x509Certificate2.Extensions[i].RawData, 2, serial_mask_array, 0, serial_mask_length);