mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 17:25:38 +00:00
52344c2972
The macro constant `MBEDTLS_SSL_MAC_ADD` defined in `ssl_internal.h` defines an upper bound for the amount of space needed for the record authentication tag. Its definition distinguishes between the presence of an ARC4 or CBC ciphersuite suite, in which case the maximum size of an enabled SHA digest is used; otherwise, `MBEDTLS_SSL_MAC_ADD` is set to 16 to accomodate AEAD authentication tags. This assignment has a flaw in the situation where confidentiality is not needed and the NULL cipher is in use. In this case, the authentication tag also uses a SHA digest, but the definition of `MBEDTLS_SSL_MAC_ADD` doesn't guarantee enough space. The present commit fixes this by distinguishing between the presence of *some* ciphersuite using a MAC, including those using a NULL cipher. For that, the previously internal macro `SSL_SOME_MODES_USE_MAC` from `ssl_tls.c` is renamed and moved to the public macro `MBEDTLS_SOME_MODES_USE_MAC` defined in `ssl_internal.h`. |
||
---|---|---|
.. | ||
mbedtls | ||
.gitignore | ||
CMakeLists.txt |