Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault error with TLS #112

Open
cBevilaqua opened this issue Oct 7, 2019 · 0 comments
Open

Segmentation fault error with TLS #112

cBevilaqua opened this issue Oct 7, 2019 · 0 comments

Comments

@cBevilaqua
Copy link

Hello,

I'm trying to connect but i'm getting the error:
[1] 91694 segmentation fault

My code is:

`<?php
$client = new Mosquitto\Client('Ruckus');
$client->onConnect(function($code, $message) use ($client) {
$client->subscribe('1.0.0/LOC/SPOT_GPB/#', 0);
});

$client->onMessage(function($message) {
echo $message->topic, "\n", $message->payload, "\n\n";
});

$client->onLog(function($message) {
echo $message;
});

// set tls psk
$identity = 'vspot';
$key = '3132333435363738';
$client->setTlsPSK($key, $identity);
$client->setTlsInsecure(true);
$client->setTlsOptions(Mosquitto\Client::SSL_VERIFY_NONE, 'tlsv1.2', null);

$client->connect('192.168.4.60', 8883);
$client->loopForever();`

I'm using PHP 7.2.16 on Mac OSX 10.14.5

Do you have some idea of what could be causing the error?
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant