I have managed to establish a proper TLS connection with the proper credentials, but it seems that TLS session resumption is missing from my implementation since my device does the TLS handshake every time it reconnects after I close the connection.
I cannot seem to find anything about implementing TLS session resumption in the documentations and I am lost with regards to implementing it.
Hi Tan,Please compare your implementation to this MQTT with TLS sample and use the latest modem firmware for the best experience.
My implementation is the same as the example provided. I can get a TLS session going no problems. But not for TLS session resumption.
Edit: I am using the latest modem firmware
The TLS session cache is disabled by default.Please see nrf_sec_session_cache_t for details: https://github.com/NordicPlayground/nrfxlib/blob/master/bsdlib/include/nrf_socket.h#L403note: Session cache, even if enabled may not be used if the peer does not support it.
But the struct type 'nrf_sec_config_t' from the header file 'nrf_socket.h' is of a totally different type from the one used in the MQTT example. There is no 'session_cache' variable in the 'mqtt_sec_config' struct.