title: Create CSR with Bouncy Castle (C#) inclusive EC Curve Name
body: <p>I create a CSR with Bouncy Castle and sign it on HSM (EC Key). It works fine! But in the CSR content (and in the certificate later) there is no EC curve name. Instead, there are the parameters of the curve. Some clients have problems with this, e.g .: Phyton. On the screenshot you can see how OpenSSL does it. How can I force Bouncy Castle to write the curve name in the CSR?</p>
  <p>The code for the Adding the Public Key to CSR:</p>
  <pre><code>IList oids = new ArrayList();
  IList values = new ArrayList();
  ..........
  
  SubjectKeyIdentifier subjectKeyIdentifier = new SubjectKeyIdentifierStructure(publicKey);
  X509Extension ski = new X509Extension(true, new DerOctetString(subjectKeyIdentifier));
  oids.Add(X509Extensions.SubjectKeyIdentifier);
  values.Add(ski);
  
  AttributePkcs attribute = new AttributePkcs(PkcsObjectIdentifiers.Pkcs9AtExtensionRequest,
                    new DerSet(new X509Extensions(oids, values)));
  //End Extensions
  
  // SIGN on HSM
  Pkcs10CertificationRequestDelaySigned csr = new Pkcs10CertificationRequestDelaySigned(
                      signatureAlgorithmStr,
                      subject,
                      publicKey,
                      new DerSet(attribute)
                  );
  ......
  </code></pre>
  <p>Screenshot: CSR with Bouncy Castle und OpenSSL</p>
  <p><img src="https://i.stack.imgur.com/eqPHc.png" alt="Screenshot: CSR with Bouncy Castle und OpenSSL" /></p>