0

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?

Deepak
  • 5
  • 4
  • https://letsencrypt.org/2018/04/04/sct-encoding.html explains how to decode this data. The data itself is ASN1 encoded but contains TLS encoded binary data in it: https://tools.ietf.org/html/rfc5246#section-4 – Oguz Ozgul Mar 21 '20 at 07:47
  • 1
    Thanks for the link ! it helped me to decode it!!! – Deepak Mar 23 '20 at 18:46

0 Answers0