title: SSL certificate error
body: <p>I am testing SSL access to a local node server with key,ca,cert in options ( self-signed w OpenSSL)</p>
  
  <pre><code>var server_options = {
    key: fs.readFileSync('/etc/ssl/self-signed/server.key'),
    ca: fs.readFileSync('/etc/ssl/self-signed/server.csr'),
    cert: fs.readFileSync('/etc/ssl/self-signed/server.crt')
  };
  </code></pre>
  
  <p>trying to access it:</p>
  
  <pre><code>curl -v --user 1234567890:abcdefghijklmnopqrstuvwxyz --data "grant_type=password&amp;username=yves&amp;password=123456789" https://macMini.local:8000/oauth/token
  </code></pre>
  
  <p>using curl I get the following error:</p>
  
  <blockquote>
    <p>curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
    error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed</p>
  </blockquote>
  
  <p>I downloaded the ca certificate from <a href="http://curl.haxx.se/ca/cacert.pem" rel="nofollow noreferrer">http://curl.haxx.se/ca/cacert.pem</a> and add them to my curl-ca-bundle-new.crt file, as suggested in some posts related to curl... but no way</p>
  
  <p>here is the log</p>
  
  <blockquote>
    <ul>
    <li>About to connect() to macMini.local port 8000 (#0)<br>
    <br>
    
    <ul>
    <li>Trying 192.168.1.14...</li>
    <li>connected</li>
    <li>Connected to macMini.local (192.168.1.14) port 8000 (#0)</li>
    <li>SSLv3, TLS handshake, Client hello (1):</li>
    <li>SSLv3, TLS handshake, Server hello (2):</li>
    <li>SSLv3, TLS handshake, CERT (11):</li>
    <li>SSLv3, TLS alert, Server hello (2):</li>
    <li>SSL certificate problem, verify that the CA cert is OK. Details:
    error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed</li>
    <li>Closing connection #0
    curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
    error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
    More details here: <a href="http://curl.haxx.se/docs/sslcerts.html" rel="nofollow noreferrer">http://curl.haxx.se/docs/sslcerts.html</a></li>
    </ul></li>
    </ul>
  </blockquote>
  
  <p>I know I can bypass the Curl CA checking, using:</p>
  
  <pre><code>curl -k -v --user 1234567890:abcdefghijklmnopqrstuvwxyz --data "grant_type=password&amp;username=yves&amp;password=123456789" https://macMini.local:8000/oauth/token
  </code></pre>
  
  <p>in which case it's running fine, I can see:</p>
  
  <blockquote>
    <p>SSL certificate verify result: self signed certificate (18), continuing anyway.</p>
  </blockquote>
  
  <p>but I'd like to know if there is any way to solve this issue...</p>