I created paho mqtt client with following options
MQTTClient_SSLOptions ssl_opts = MQTTClient_SSLOptions_initializer;
int rc;
MQTTClient_create(&client, "ssl://localhost:8883",CLIENTID,MQTTCLIENT_PERSISTENCE_NONE, NULL);
conn_opts.ssl = &ssl_opts;
conn_opts.ssl->keyStore = "/home/certs/php-client-chain.pem";
conn_opts.ssl->privateKeyPassword = "password";
conn_opts.ssl->enabledCipherSuites = "DEFAULT";
conn_opts.ssl->enableServerCertAuth = 0;
MQTTClient_setCallbacks(client, NULL, connlost, msgarrvd, delivered);
if ((rc = MQTTClient_connect(client, &conn_opts)) != MQTTCLIENT_SUCCESS)
{
printf("Failed to connect, return code %d\n", rc);
return;
}
When I executed the code I am getting failed to connect error return code -1.Nothing is displayed in the broker's log file.