How to set TLS maximum fragment length negotiation for Azure IoT Hub

Nika Chikovani 20 Reputation points
2023-12-16T17:08:14.2233333+00:00

Hi everyone. Can TLS maximum fragment length be modified on the IoT Hub? I want to limit it to 2 Kbyte for concrete reasons. Thank you in advance.

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
391 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,149 questions
0 comments No comments
{count} votes

Accepted answer
  1. Dillon Silzer 55,481 Reputation points
    2023-12-17T03:39:59.86+00:00

    Hi Nika,

    It looks like this feature is in preview:

    TLS maximum fragment length negotiation (preview)

    IoT Hub also supports TLS maximum fragment length negotiation, which is sometimes known as TLS frame size negotiation. This feature is in public preview. Use this feature to specify the maximum plaintext fragment length to a value smaller than the default 2^14 bytes. Once negotiated, IoT Hub and the client begin fragmenting messages to ensure all fragments are smaller than the negotiated length. This behavior is helpful to compute or memory constrained devices. To learn more, see the official TLS extension spec. Official SDK support for this public preview feature isn't yet available. To get started Create a new IoT hub with preview mode on. When using OpenSSL, call SSL_CTX_set_tlsext_max_fragment_length to specify the fragment size. Connect your client to the preview IoT Hub.

    Cited from https://video2.skills-academy.com/en-us/azure/iot-hub/iot-hub-tls-support#tls-maximum-fragment-length-negotiation-preview

    I believe once this feature hits General Availability you will be able to "specify the maximum plaintext fragment length to a value smaller than the default 2^14 bytes".


    If this is helpful please accept the answer.

    0 comments No comments

0 additional answers

Sort by: Most helpful