mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-22 23:05:41 +01:00
d5cfe6fbd0
This commit changes the internal identifiers MBEDTLS_SSL_MINOR_VERSION_XXX in DTLS-only builds to match the version encoding used by the DTLS standard, encoding DTLS 1.0 as 255 and DTLS 1.2 as DTLS 1.0. Accordingly, the version comparison functions introduced in the previous commit must be re-implemented, as older version have _larger_ identifiers now. Further, since we identify DTLS 1.0 as MBEDTLS_SSL_MINOR_VERSION_2 and DTLS 1.2 as MBEDTLS_SSL_MINOR_VERSION_3, what remains is to define MBEDTLS_SSL_MINOR_VERSION_{0|1}. While these don't have any meaning meaning in DTLS, they still need to be set and obey the ordering in the sense that the version comparison functions '<=' should attest that MBEDTLS_SSL_MINOR_VERSION_i '<=' MBEDTLS_SSL_MINOR_VERSION_j for i <= j. Since '<=' is actually >= and the wire format value for DTLS 1.0 == MBEDTLS_SSL_MINOR_VERSION_2 is the 255, this forces us to use values beyond 255, and hence to extend the storage type for minor versions from uint8_t to uint16_t. |
||
---|---|---|
.. | ||
mbedtls | ||
tinycrypt | ||
.gitignore | ||
CMakeLists.txt |