How to Decode SCT List from SSL cert in C#

408 views Asked by At

I am currently doing this :

        var extensions = (certificate.Extensions ?? new X509ExtensionCollection()).Cast<X509Extension>();
        var sctExtension = extensions.Where(x => x.Oid.Value.Equals("1.3.6.1.4.1.11129.2.4.2")).FirstOrDefault();
       AsnEncodedData asndata = new AsnEncodedData(sctExtension.Oid, sctExtension.RawData);

       string sctListLines = asndata.Format(true); // This returns the SCT list with each field on a new line

But format is not decoding the SCT in the human readable form. Can someone advise me what is wrong with this code?

0

There are 0 answers