title: could not load PEM client certificate, OpenSSL
body: <p>I have four files provided from client side.</p>
  
  <ul>
  <li>test.jks </li>
  <li>test.pem </li>
  <li>key.pub </li>
  <li>test.p12 </li>
  </ul>
  
  <p>I have to send json array on this url using curl. so i'm confused what is the use of other files ? like .p12 , .jks. what is the key from above files ?
  I started with .pem file included using this link  :
  <a href="https://stackoverflow.com/questions/33880306/how-to-send-a-curl-request-with-pem-certificate-via-php">How to send a curl request with pem certificate via PHP?</a></p>
  
  <p>So , I got following errors.</p>
  
  <p>Error : </p>
  
  <blockquote>
    <p>Curl Error: could not load PEM client certificate, OpenSSL error
    error:0906D06C:PEM routines:PEM_read_bio:no start line, (no key found,
    wrong pass phrase, or wrong file format?)No HTTP code was returned</p>
  </blockquote>
  
  <p>Code : </p>
  
  <pre><code>$url = "https://adfapi.adftest.rightmove.com/v1/property/sendpropertydetails";
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  
  $pemFile = tmpfile();
  fwrite($pemFile, "test.pem");//the path for the pem file
  $tempPemPath = stream_get_meta_data($pemFile);
  $tempPemPath = $tempPemPath['uri'];
  curl_setopt($ch, CURLOPT_SSLCERT, $tempPemPath); 
  
  //curl_setopt($ch, CURLOPT_SSLCERT, "test.pem" );
  curl_setopt($ch,CURLOPT_SSLCERTTYPE,"PEM");
  
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, True);
  curl_setopt($ch, CURLOPT_POST, True);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
  curl_setopt($ch, CURLOPT_VERBOSE, true);
  
  $result = curl_exec($ch);
  
  if(!$result)
  {
      echo "Curl Error: " . curl_error($ch);
  }
  else
  {
      echo "Success: ". $result;
  }
  
    $info = curl_getinfo($ch);
  
    curl_close($ch); // close cURL handler
  
    if (empty($info['http_code'])) {
            die("No HTTP code was returned"); 
    } else {
        // load the HTTP codes
        $http_codes = parse_ini_file("path/to/the/ini/file/I/pasted/above");
  
        // echo results
        echo "The server responded: &lt;br /&gt;";
        echo $info['http_code'] . " " . $http_codes[$info['http_code']];
    }
  </code></pre>