I'm developing a php client to interact with Nominet EPP server, and as I found in their web site:http://registrars.nominet.uk/namespace/uk/registration-and-domain-management/registrar-systems/epp/registration
I need to use a "Verisign Class 3 Public Primary Certification Authority" root certificate. I found one in here (Verisign is bought by Symantec): https://knowledge.symantec.com/support/mpki-for-ssl-support/index?page=content&id=SO5624&actp=LIST&viewlocale=en_US
When I use it in my php code:
//$context = stream_context_create(array($this->protocol => $options));
$context = stream_context_create();
stream_context_set_option($context, $this->protocol, 'local_cert', __DIR__ . '/../../certificates/'.$this->certificate_path);
$errno = false;
$errstr = false;
$this->socket = stream_socket_client($this->protocol.'://'.$this->hostname.':'.$this->port, $errno, $errstr, 5 , STREAM_CLIENT_CONNECT, $context);
Everything is ok: path of certificate, port, hostname ... And I get:
"stream_socket_client(): Unable to set private key file ..."
I know I need a private key, but in Symentec website they don't give a private key.
Do anyone have any idea ?
Thanks so much,
Hassan,
You are not using the right context option. This option is to define your certificate. What you want is use the certificate you found to authenticate the peer server, to make sure you are really talking to the right one.
As stated by this:
On PHP Doc:
But what you want is this: