This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

TLS Session Resumption on nRF9160

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.

Parents Reply Children
  • 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.

  • Hi, I have the same problem here. I would like to enable the session cache with setsockopt(). The header net/socket.h does not provide that option. Whereas the header nrf_socket.h defines the option NRF_SO_SEC_SESSION_CACHE with numeric value 3, whis is the same as the numeric value of TLS_CIPHERSUITE_LIST in net/socket.h. So I certainly cannot use this option ID with setsockopt() from net/socket.h, as is will be interpreted as a ciphersuit list. Does this mean that I have to rewrite my application using all the corresponding nrf_socket functions defined in nrf_socket.h instead of the functions defined in net/socket.h? All the SDK samples use net/socket.h, not nrf_socket.h, btw, and in another thead I read that I should use the net/socket functions, which internally use the nrf_socket functions anyway, which makes me wonder why the option definitions are inconsistent.

Related