title: Parsing X509 extensions with pyasn1
body: <p>I've got an extension which is described as follows:</p>
  
  <pre><code>Extension().setComponentByPosition(0, ObjectIdentifier(2.5.29.19))
             .setComponentByPosition(1, Boolean('False'))
             .setComponentByPosition(2, Any(hexValue='04023000'))
  </code></pre>
  
  <p>So based on the id, it's a <code>BasicConstraints</code> extension. However if I try to parse the value as the extension itself, I get an error:</p>
  
  <pre><code>decoder.decode(decoder.decode(e['extnValue'])[0], rfc2459.BasicConstraints())
  # PyAsn1Error: Uninitialized component #0 at BasicConstraints()
  </code></pre>
  
  <p>That string decodes to an empty sequence, so it can legally be a <code>BasicConstraints</code> - <code>name length</code> optional/missing and <code>ca</code> is default, so not encoded in DER.</p>
  
  <p>So what am I missing here? How do I decode this extension to the <code>BasicConstraints</code> class?</p>
  
  <p>PS. this issue seems similar to an <a href="http://sourceforge.net/p/pyasn1/mailman/message/30465451/" rel="nofollow">issue in mailing list</a>, but I'm using 0.1.8 which should already include the mentioned fix</p>