title: Openssl x509v3 Extended Key Usage
body: <p>I know you can specify the purpose for which a certificate public key can be used for by adding a line like this one in the <em>openssl.cfg</em> file:</p>
  
  <pre><code>extendedKeyUsage=serverAuth,clientAuth
  </code></pre>
  
  <p>But since I have several certificates to create, each with a different extended key usage, is it possible to specify which attribute I need in the command line (without using the openssl.cfg file)? Something like:</p>
  
  <pre><code>openssl req -newkey rsa:4096 \
              -extendedKeyUsage "serverAuth,clientAuth" \
              -keyform PEM \
              -keyout server-key.pem \
              -out server-req.csr \
              -outform PEM
  </code></pre>
  
  <p>Thanks!</p>