which is implemented based on either MPS or the legacy messaging layer, depending on MBEDTLS_SSL_USE_MPS. The handshake state handlers now use primarily this function instead of the previous MPS/non-MPS #ifdef-salad, which makes the code both shorter and easier to read.
This PR introduces a helper function for fetching handshake messages of a given expected type,
which is implemented based on either MPS or the legacy messaging layer, depending on
MBEDTLS_SSL_USE_MPS
. The handshake state handlers now use primarily this function instead of the previous MPS/non-MPS#ifdef
-salad, which makes the code both shorter and easier to read.