-
Notifications
You must be signed in to change notification settings - Fork 83
PHP 5.6: Can't connect to the server that uses self-signed certificate. #19
Comments
Any update on this issue? @youmad i encounter the same issue. Using your code above fixed it. |
Hi, I can also confirm @youmad code fixes the errors with self-signed certificate, perhaps this additional configuration could be passed as an option of the XMPP client ? $client = new \Client($address);
$client->setSslOptions(
[
'allow_self_signed' => true,
'verify_peer_name' => false
]
); |
I used above patch to get rid of the message, BTW it's a letsencrypt cert: Now getting: Any idea how to fix stream_socket_enable_crypto? Thanks. |
@jpaechnatz You may try with option $options = [
'ssl' => [
'allow_self_signed' => true,
'verify_peer' => false, // THIS
'verify_peer_name' => false,
],
]; |
Works! Thanks! Could someone provide a patch or config Option for it? |
@jpaechnatz It's already here #31 |
In
connect()
method of Fabiang\Xmpp\Stream\SocketClient class it is necessary to usestream_socket_client()
with the sixth attribute:stream_context_create($options)
where
$options
contains settings of SSL, for example:This is required so as to have possibility to use self signed SSL certificates.
The text was updated successfully, but these errors were encountered: