title: Add client certificate in socket connection
body: <p>I am stuck with this problem since last few days but could not get any solution.</p>
  
  <p>I am using net php-epp client and here is my code...</p>
  
  <pre><code>$context = stream_context_create(
      array(
          'ssl'=&gt;array(
              'local_cert'=&gt; dirname(__FILE__).'/cert.pem',
              'passphrase' =&gt; dirname(__FILE__).'/key.pem',
          )
      )
  );
  
  $greeting = $client-&gt;connect($host, $port, $timeout, $ssl, $context);
  echo $greeting;
  </code></pre>
  
  <p>I am getting following error...</p>
  
  <pre><code>Warning: stream_socket_client(): Unable to set private key file
  </code></pre>
  
  <p>And before you ask <code>key.pem</code> starts with <code>-----BEGIN RSA PRIVATE KEY-----</code> and <code>cert.pem</code> starts with <code>-----BEGIN CERTIFICATE-----</code></p>
  
  <p>However i can connect using...</p>
  
  <pre><code>openssl s_client -connect epp.dom.net:700 -key key.pem -cert cert.pem -CApath /etc/ssl/certs/
  </code></pre>
  
  <p>This command shows connected, so does that mean my certificates are fine?</p>
  
  <p>Please someone help me to fix this. Please</p>
  
  <p>Thank You.</p>