title: SSL read: errno -12192
body: <p>I am getting error "SSL read:errno-12192"</p>
  
  <p>Actually previous my programming was working fine but past 1 week I was getting error:</p>
  
  <blockquote>
    <p>SSL error: SSL_ERROR_EXPIRED_CERT_ALERT</p>
  </blockquote>
  
  <p>I then replaced my .pem file with new certificate and after replacing it I am getting 'SSL read: errno -12192'error.  My code as below:</p>
  
  <pre><code>curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, TRUE);
  curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1);
  curl_setopt($curl, CURLOPT_HEADER, true);
  curl_setopt($curl, CURLOPT_POST, true);
  curl_setopt($curl, CURLOPT_POSTFIELDS, $params ); 
  curl_setopt($ch, CURLOPT_CAINFO,  getcwd().'/ca.crt');
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  curl_setopt($ch, CURLOPT_SSLCERT, getcwd().'/apna_generic_json.pem');
  curl_easy_setopt(s, CURLOPT_SSLKEY,'/apna.pem'); 
  curl_setopt($ch, CURLOPT_SSLCERTTYPE, "PEM");
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  </code></pre>