[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[paho-dev] Paho OpenSSL Crash (C API)

Dear All,

  First of all thanks for all your help, I am struggling here with Paho and Openssl for one week using the Paho C (API) on a windows enviroment. I created a basic application connecting to
ssl://test.mosquitto.org:8884 ÂÂand when I run It crashes.
...
MQTTAsync_SSLOptions sslopts = MQTTAsync_SSLOptions_initializer;

sslopts.trustStore = "C:/test.pem";
//sslopts.trustStore = "C:/test.mosquitto.org.crt";
//sslopts.keyStore = "C:/test.mosquitto.org.crt";
conn_opts.ssl = &sslopts;


conn_opts.keepAliveInterval = MQTTApiManager::GetKeepAlive();
conn_opts.cleansession = 1;
conn_opts.>
conn_opts.>
conn_opts.context = mqtt_client_inst;
conn_opts.connectTimeout = GetTimeout() / 1000;
if ((rc = MQTTAsync_connect(mqtt_client_inst, &conn_opts)) != MQTTASYNC_SUCCESS)
{
*nStatus = MQTT_ERROR_CONNECTING_BROKER;
return rc;
}
...


Inline image 1


Do you guys have any idea what kind of problem I am facing here? I am looking on the web, I also tried to debug Paho but the problem seems to be in OpenSSL. OpenSSL I got from the WebSite compiled on my machine (didn't install) and then I copied the binaries to the Visual Studio folder of the Paho and changed the dependencies (lib) of the paho project to use the updated OpenSSL (libs).
I am using Paho 1.0.3

Thanks,
Paulo Balbino