Browse Source

Fix #974 Wrong certificate expected when using SRV records

pull/1328/head
Timothée Jaussoin 1 year ago
parent
commit
dcebc26dc7
  1. 1
      CHANGELOG.md
  2. 27
      linker.php

1
CHANGELOG.md

@ -3,6 +3,7 @@ Movim Changelog
v0.24.2 (master)
---------------------------
* Fix #974 Wrong certificate expected when using SRV records
* Move the Message files to the SQL database
* Add thumbhash support when uploading images in the chat
* Fix #1164 Implement XEP-0410: MUC Self-Ping (Schrödinger's Chat) basic behavior

27
linker.php

@ -28,17 +28,7 @@ $dns = $factory->create($server);
Scheduler::getInstance()->start();
// TCP Connector
$connector = new React\Socket\HappyEyeBallsConnector(
$loop,
new React\Socket\Connector([
'timeout' => 5.0,
'tls' => [
'SNI_enabled' => true,
'allow_self_signed' => false
]
]),
$dns
);
$connector = null;
// We load and register all the widgets
$wrapper = \Movim\Widget\Wrapper::getInstance();
@ -128,6 +118,8 @@ function enableEncryption($connection)
function handleClientDNS(array $results, $dns, $connector, $xmppBehaviour)
{
global $loop;
if (count($results) > 1) {
$port = 5222;
$directTLSSocket = false;
@ -167,6 +159,19 @@ function handleClientDNS(array $results, $dns, $connector, $xmppBehaviour)
logOut(colorize('Connect to ' . $socket, 'blue'));
$connector = new React\Socket\HappyEyeBallsConnector(
$loop,
new React\Socket\Connector([
'timeout' => 5.0,
'tls' => [
'SNI_enabled' => true,
'allow_self_signed' => false,
'peer_name' => $host
]
]),
$dns
);
$connector->connect($socket)->then(
$xmppBehaviour,
function (\Exception $error) {

Loading…
Cancel
Save