title: How to generate a self-signed SSL certificate using OpenSSL?
body: <p>I'm adding HTTPS support to an embedded Linux device. I have tried to generate a self-signed certificate with these steps:</p>
  
  <pre><code>openssl req -new &gt; cert.csr
  openssl rsa -in privkey.pem -out key.pem
  openssl x509 -in cert.csr -out cert.pem -req -signkey key.pem -days 1001
  cat key.pem&gt;&gt;cert.pem
  </code></pre>
  
  <p>This works, but I get some errors with, for example, Google Chrome:</p>
  
  <blockquote>
    <p>This is probably not the site you are looking for!<br>
    The site's security certificate is not trusted!</p>
  </blockquote>
  
  <p>Am I missing something? Is this the correct way to build a self-signed certificate?</p>