title: openssl generate self-signed certificate puts private key and certificate to one file?
body: <p>for generating self-signed certificate via <code>openssl</code> command, usually I specify the <code>-keyout</code> and <code>-out</code> to different file, but this time I see a command like this, from <a href="https://docs.python.org/3/library/ssl.html#self-signed-certificates" rel="nofollow noreferrer">python ssl module: Self-signed certificates</a></p>
  <pre><code>openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout cert.pem
  </code></pre>
  <p>It writes the private key to the same file as certificate?
  What is advantage of this? why put them together here?</p>