title: How to create CSR with emailAddress oneline?
body: <p>I'm working on a <a href="https://github.com/jeff-puckett/openssl.csr.bash" rel="noreferrer">programming project that includes a bash script</a> that creates a certificate signing request.</p>
  
  <p>The piece that's giving me trouble is:</p>
  
  <pre><code>openssl req -new -nodes -sha256 -newkey rsa:2048 -keyout example.com.key -out example.com.csr -subj "/CN=example.com/emailAddress=webmaster@example.com/O=MyOrganization/OU=MyUnit/C=US/ST=AR/L=Fayetteville"
  </code></pre>
  
  <p>Almost all the attributes look great, but for some awful reason, <a href="https://www.openssl.org/docs/manmaster/apps/req.html" rel="noreferrer">openssl</a> is meshing the emailAddress line into the common name, which is resulting in invalid certificate issues in the browser.</p>
  
  <pre><code>openssl req -text -noout -verify -in example.com.csr
  </code></pre>
  
  <blockquote>
  <pre><code>verify OK
  Certificate Request:
      Data:
          Version: 0 (0x0)
          Subject: CN=example.com/emailAddress=webmaster@example.com, O=MyOrganization, OU=MyUnit, C=US, ST=AR, L=Fayetteville
  </code></pre>
  </blockquote>
  
  <p>Note how it mashes them together:</p>
  
  <blockquote>
  <pre><code>CN=example.com/emailAddress=webmaster@example.com
  </code></pre>
  </blockquote>
  
  <p>I'm expecting it to recognize the distinct attributes:</p>
  
  <blockquote>
  <pre><code>CN=example.com, emailAddress=webmaster@example.com
  </code></pre>
  </blockquote>