Skip to content

wolfssl: use larger error buffer when formatting errors #14114

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

Closed
wants to merge 1 commit into from

Conversation

alexsn
Copy link

@alexsn alexsn commented Jul 7, 2024

Currently we're using WOLFSSL_MAX_ERROR_SZ to define the error buffer size, this value is user defined which means it can be overwritten with -DWOLFSSL_MAX_ERROR_SZ=512 when building wolfssl and this overwrite is not exported to the users of wolfssl.

Instead of relying on WOLFSSL_MAX_ERROR_SZ we'll just use a 256 bytes error buffer and use wolfSSL_ERR_error_string_n to fill it thus dropping the dependency on WOLFSSL_MAX_ERROR_SZ altogether.

@github-actions github-actions bot added the TLS label Jul 7, 2024
@alexsn alexsn force-pushed the wolfssl_error_buffer branch 6 times, most recently from a733ba0 to 1b19a48 Compare July 7, 2024 15:45
@alexsn alexsn force-pushed the wolfssl_error_buffer branch 2 times, most recently from a920b99 to 15182c9 Compare July 7, 2024 22:11
Currently we're using WOLFSSL_MAX_ERROR_SZ to define the error buffer
size, this value is user defined which means it can be overwritten with
-DWOLFSSL_MAX_ERROR_SZ=512 when building wolfssl and this overwrite is
not exported to the users of wolfssl.

Instead of relying on WOLFSSL_MAX_ERROR_SZ we'll just use a 256 bytes
error buffer and use wolfSSL_ERR_error_string_n to fill it thus dropping
the dependency on WOLFSSL_MAX_ERROR_SZ altogether.
@alexsn alexsn force-pushed the wolfssl_error_buffer branch from 15182c9 to e2934c4 Compare July 7, 2024 22:15
@bagder bagder closed this in 5ab2eda Jul 9, 2024
@bagder
Copy link
Member

bagder commented Jul 9, 2024

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants