title: https connection using CURL from command line
body: <p>I am new to Curl and Cacerts world and facing a problem while connecting to a server.
  Basically, I need to test connectivity over https from one machine to another machine.
  I have a URL to which I need to connect from Machine A (a linux machine)
  I tried this on command prompt</p>
  
  <pre><code>cmd&gt; curl https://[my domain or IP address]
  </code></pre>
  
  <p>and got the following:</p>
  
  <pre><code>curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
  error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
  </code></pre>
  
  <p>On going through some articles over internet I did this:</p>
  
  <pre><code>openssl s_client -connect &lt;domain name or Ip address&gt;:443
  </code></pre>
  
  <p>and got some response including the
  server certificate (inside <code>-----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----</code>).</p>
  
  <p>What should I do next from here. I think, I will have to just copy paste the text inside
  <code>BEGIN CERTIFICATE &amp; END CERTIFICATE</code> and save it in a file.
  But, 
  What type of file it should be? <code>.pem</code>, <code>.crt</code> ?..
  What should I be do after that?</p>
  
  <p>I tried this - copied the text inside <code>BEGIN CERTIFICATE &amp; END CERTIFICATE</code> and saved it in a <code>.crt</code> file  - named it as <code>my-ca.crt</code> (also tried the same thing by naming it as <code>my-ca.pem</code> file)
  and then did this:</p>
  
  <pre><code>cmd&gt;curl --cacert my-ca.crt https://[my domain or IP address]
  </code></pre>
  
  <p>But got the same error.</p>