title: php curl ssl verify
body: <p>I just develop some softvare by php，use curllib to connect amazon，paypal，wechat，I want to verify cert and I find some params relate to this：</p>
  
  <p><code>CURLOPT_SSL_VERIFYPEER</code> ： I think if you want to verify ssl cert,this param should set true；</p>
  
  <p>but I am confused about <code>CURLOPT_CAINFO</code>  and </p>
  
  <pre><code>curl_setopt($ch,CURLOPT_SSLCERTTYPE,'PEM');
  curl_setopt($ch,CURLOPT_SSLCERT, $sslCertPath);
  curl_setopt($ch,CURLOPT_SSLKEYTYPE,'PEM');
  curl_setopt($ch,CURLOPT_SSLKEY, $sslKeyPath); 
  </code></pre>
  
  <p>when should I set <code>CURLOPT_CAINFO</code> and when should i set follow 4 params?</p>
  
  <p>I think <code>CURLOPT_CAINFO</code> is a param that to make sure  amazon is the amazon,paypal is the paypal;</p>
  
  <p>the follow 4 params is to confirm I am the real me,amazon can confirm by these 4 params.</p>
  
  <p>Am I correct?</p>
  
  <p>and I don't know how to get <code>CURLOPT_CAINFO</code> ca?because I think if I confirm amazon is the amazon ,I just verify the ca that amazon send me is enough,why shoul i send a ca to amazon?</p>