1
votes

enter image description here

I am using Paho MQTT C code, In MQTTClient_publish.c I enabled the all TLS/SSL related thing in code level and communication done working fine. But am not able to find the which API is encrypting packet.

enter image description here

1
Please do NOT post images of code they are really hard to read and impossible to search, post the actual text and use the toolbar to format it properly.hardillb

1 Answers

0
votes

Nothing in the code you have posted is doing any encrypting/decrypting of the MQTT packets.

The Paho client code sets up a TLS connection to the broker as part of opening the socket using the openssl library. This socket has the same read/write functions as a normal socket and the paho library uses these to either pass outgoing packets or read incoming packets from the socket. The openssl socket wrapper deals with all the encryption/decryption.

If you want more detail feel free to read the Paho source code.