Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macro and function for choosing message layer #339

Open
yuhaoth opened this issue Aug 4, 2021 · 0 comments
Open

Add macro and function for choosing message layer #339

yuhaoth opened this issue Aug 4, 2021 · 0 comments

Comments

@yuhaoth
Copy link
Collaborator

yuhaoth commented Aug 4, 2021

Suggested enhancement

MPS(message process stack) has been created and apply in TLS1.3 code. It will replace legay message layer in future.
But TLS1.2 still use legacy message layer now.

we need MACRO and function to identify which case should use legacy layer and which should use mps.

define a new macro MBEDTLS_SSL_LEGACY_MSG_LAYER_REQUIRED

#if defined(MBEDTLS_SSL_PROTO_TLS1_2) || \
    ( defined(MBEDTLS_SSL_PROTO_TLS1_3_EXPERIMENTAL) && !defined(MBEDTLS_SSL_USE_MPS) )
#define MBEDTLS_SSL_LEGACY_MSG_LAYER_REQUIRED
#endif

For runtime dispatch, define a static inline function like mbedtls_ssl_legacy_msg_layer_in_use()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant