LiamBindle / MQTT-C

A portable MQTT C client for embedded systems and PCs alike.
https://liambindle.ca/MQTT-C
MIT License
775 stars 275 forks source link

Fix MQTT-C issue with TLS 1.3 session tickets #182

Open joakim-tjernlund opened 1 year ago

joakim-tjernlund commented 1 year ago

TLS 1.3 server may choose to issue new session ticket in the middle of active connection. This will cause next mbedtls_ssl_read() or mbedtls_ssl_write() to return MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET. This is not a real error, rather notification to the application to save session ticket for later use. As TLS reconnection is out of scope at this point we can safely ignore it and retry operation.

Please refer to mbedtls/programs/ssl/ssl_client2.c for session ticket handling.

joakim-tjernlund commented 1 year ago

Ping?