-
Notifications
You must be signed in to change notification settings - Fork 8
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
Compile when few options are set #292
base: tls13-prototype
Are you sure you want to change the base?
Conversation
When the stack is compiled with minimal extensions (without 0RTT, ALPN, MFL, and MPS) then compilation errors occur
I'm hitting a new error:
|
library/ssl_tls13_client.c
Outdated
@@ -176,10 +176,13 @@ int ssl_write_early_data_process( mbedtls_ssl_context* ssl ) | |||
#endif /* MBEDTLS_SSL_USE_MPS */ | |||
|
|||
#else /* MBEDTLS_ZERO_RTT */ | |||
#if defined(MBEDTLS_SSL_USE_MPS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ISTM that we should rather guard the declarations of buf, buf_len, ...
by MBEDTLS_SSL_USE_MPS && MBEDTLS_ZERO_RTT
.
library/ssl_tls13_client.c
Outdated
@@ -2725,6 +2728,9 @@ static int ssl_encrypted_extensions_parse( mbedtls_ssl_context* ssl, | |||
size_t ext_len; | |||
const unsigned char *ext; | |||
|
|||
/* ssl structure is not used when ALPN, 0RTT, and MFL extensions are not used. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment should be replaced by the appropriate compile-time guard.
library/ssl_tls13_server.c
Outdated
@@ -2269,6 +2269,10 @@ static int ssl_client_hello_fetch( mbedtls_ssl_context* ssl, | |||
|
|||
static void ssl_debug_print_client_hello_exts( mbedtls_ssl_context *ssl ) | |||
{ | |||
#if !defined(MBEDTLS_DEBUG_C) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ISTM that the entire function could be guarded by MBEDTLS_DEBUG_C
and defined as a dummy if !MBEDTLS_DEBUG_C
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Hannes - left a few minor change requests.
Description
When the stack is compiled with minimal extensions (without 0RTT, ALPN, MFL, and MPS) then compilation errors occur due to unused variables.
Status
DONE
Requires Backporting
NO
Migrations
NO
Additional comments
Todos
Steps to test or reproduce
To reproduce the errors, use the config.h file from the EEMBC benchmark here:
https://raw.githubusercontent.com/eembc/mbedtls/eembc-setup/include/mbedtls/config.h