title: Parse "Certificate Policies" extension
body: <p>I have a certificate (<code>X509Certificate2</code>) in my app, and I can enumerate all certificate's extensions. One of those extensions is Certificate Policies, with OID 2.5.29.32. 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?</p>
  
  <p>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.</p>
  
  <p>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:</p>
  
  <ol>
  <li>it uses standard .NET library functions</li>
  <li>it uses mature or proven source code or library, smaller than Bouncy Castle (I need only parsing, not the all the rest)</li>
  <li>it merely improves on the code I already have, in a matter that I find worthy</li>
  </ol>
  
  <p>BUMP: Bounty expires today. If no one else provides an answer it'll go to GalacticJello.</p>