title: CentOS PHP curl unable to negotiate an acceptable set of security parameters
body: <p>On an Ubuntu 14.04.3 this code works fine:</p>
  
  <pre><code>$url_login = "https://test.example.com/login.do";
  
  $cert_file = '/var/www/html/test/cert.pem';
  $ssl_key = '/var/www/html/test/cert_private.pem';
  
  $post_fields = 'userAction=1&amp;cancelReason=&amp;cancelType=&amp;account=&amp;memoType=&amp;userText=&amp;userid=99999999&amp;password=xxxxxxxxxxxxxxxx';
  
  $ch = curl_init();
  
  $options = array( 
      CURLOPT_RETURNTRANSFER =&gt; 1,
      CURLOPT_HEADER         =&gt; 1,
      CURLOPT_FOLLOWLOCATION =&gt; 1,
      CURLOPT_SSL_VERIFYHOST =&gt; 0,
      CURLOPT_SSL_VERIFYPEER =&gt; 0,
  
      CURLOPT_USERAGENT =&gt; 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)',
      CURLOPT_VERBOSE        =&gt; 0,
      CURLOPT_URL =&gt; $url_login ,
  
      CURLOPT_SSLCERT =&gt; $cert_file ,
      CURLOPT_SSLCERTTYPE, 'PEM',
      CURLOPT_SSLKEY =&gt; $ssl_key,
  
      CURLOPT_COOKIESESSION =&gt; 1,
  
      CURLOPT_POST =&gt; true,
      CURLOPT_POSTFIELDS =&gt; $post_fields
  );
  
  curl_setopt_array($ch , $options);
  
  $output = curl_exec($ch);
  </code></pre>
  
  <p>The php on Ubuntu is using curl with openssl.</p>
  
  <p>On a Centos 7 if fails with:</p>
  
  <pre><code>Curl Error : SSL peer was unable to negotiate an acceptable set of security parameters.
  </code></pre>
  
  <p>curl is here with nss.</p>
  
  <p>The "cert.pem" contains only the client certificate with the cert-chain, and the "cert_private.pem" contains the private key not password protected. (-----BEGIN RSA PRIVATE KEY-----).</p>
  
  <p>How can i get the above PHP code work with both? openssl and nss implementations of curl?</p>