title: Get ssl certificate on localhost
body: <p>I am creating come server-client application and I want to get the certificate. I tried to find some tutorials, for example I found this:  </p>
  
  <pre><code>openssl req -x509 -out localhost.crt -keyout localhost.key \
   -newkey rsa:2048 -nodes -sha256 \
   -subj '/CN=localhost' -extensions EXT -config &lt;( \
   printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
  </code></pre>
  
  <p>But I got "Cannot find file". Please, tell me how to do it.</p>