title: How to generate cert with -extfile option by bcprov.jar
body: <p>I need to write java code generate a X509 certificate by bcprov.jar.</p>
  
  <p>My openssl.cnf is as below:</p>
  
  <pre><code>[ v3_req ]
  # Extensions to add to a certificate request
  basicConstraints = CA:TURE
  keyUsage = nonRepudiation, digitalSignature, keyEncipherment
  
  [ v3_ca ]
  # Extensions for a typical CA
  basicConstraints = CA:true
  </code></pre>
  
  <p>I found the <code>JcaX509v3CertificateBuilder</code> with <code>addExtension</code> function will be ok, but I didn't know how the specify the desired section.</p>
  
  <p>For example, I want to set <code>basicConstraints</code> in <code>[v3_req]</code> section to true, and  set that in <code>[v3_ca]</code> to false, how can I specify the section?</p>
  
  <p><code>addExtension</code> function only accept the <code>basicConstraints</code> parameter, and doesn't have a parameter accept the section.  </p>