Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] mosquitto_tls_set() returns invalid function arguments

Greetings,

I have been trying to get a lib mosquitto based client working.

Added in what I have been trying to do.

But mosquitto_tls_set() returns 3,  Invalid function arguments provided

Any idea, why ?

Thanks,

Manu

--

const char *CA_CERT = "./ca.crt"; // CA Certificate (PEM)

ret = mosquitto_lib_init();
mosq = mosquitto_new(NULL, clean_session, NULL);
mosquitto_log_callback_set(mosq, mosq_log_callback);
ret = mosquitto_tls_insecure_set(mosq, true);
ret = mosquitto_tls_set(mosq, CA_CERT, NULL, NULL, NULL, NULL);


Mosquitto lib initialized, ret: 0
New Mosquitto Session instantiated
ERROR: moquitto_tls_set, ret:  3 ,  Invalid function arguments provided.
ERROR: Setup failed, ret: 3 Invalid function arguments provided.


Back to the top