I have a certificate (
) in my app, and I can enumerate all certificate's extensions. One of those extensions is Certificate Policies, with OID 18.104.22.168. This extension is supposed to be just a sequence of OID's, and I need to search for specific OID's there. The problem is that this extension is coded as DER octet string. How can I get to the OID inside that I'm interested in? Do I have to manually parse a DER octet string? How can I do that?
EDIT: I'm going to see what Bouncy Castle has to offer, but I'm wondering if there is a ready solution in .NET framework. Framework parses certificates and other DER structures, so there might be DER decoder built in.
BOUNTY: I have found a solution for me, but I'm looking for improvements. Bounty goes to other solution if it satisfies one or more of the following, sorted by relevance:
- it uses standard .NET library functions
- it uses mature or proven source code or library, smaller than Bouncy Castle (I need only parsing, not the all the rest)
- it merely improves on the code I already have, in a matter that I find worthy
BUMP: Bounty expires today. If no one else provides an answer it'll go to GalacticJello.