ARMmbed

Decoder ring for SSL_MAJOR and SSL_MINOR defines

How does something like

mbedtls_ssl_conf_max_version(&p_sslInfo->conf,
MBEDTLS_SSL_MAJOR_VERSION_3,
MBEDTLS_SSL_MINOR_VERSION_3);

translate to “TLS 1.2” and

mbedtls_ssl_conf_min_version(&p_sslInfo->conf,
MBEDTLS_SSL_MAJOR_VERSION_3,
MBEDTLS_SSL_MINOR_VERSION_1);

translate to “TLS 1.0” and where does one go to figure out this magical mapping of MBEDTLS major and minor values to acutal protcol versions?

Hi @applesauce49
Thank you for your question.
In the TLS 1.2 RFC 5246 you will see:

struct {
       uint8 major;
       uint8 minor;
   } ProtocolVersion;

   ProtocolVersion version = { 3, 3 };     /* TLS v1.2*/

Which means that version 3.3 is TLS 1.2
In the TLS 1.0 RFC 2246 you will see:

    struct {
        uint8 major, minor;
    } ProtocolVersion;

    ProtocolVersion version = { 3, 1 };     /* TLS v1.0 */

Which means that version 3.1 is TLS 1.0
Regards,
Mbed TLS Support
Ron