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

Fix recommended read buffer size #126

Merged
merged 2 commits into from
Sep 29, 2023
Merged

Fix recommended read buffer size #126

merged 2 commits into from
Sep 29, 2023

Conversation

bugadani
Copy link
Collaborator

@bugadani bugadani commented Sep 29, 2023

This PR corrects a documentation issue which may lead to users providing a smaller read buffer than required. This may cause reading data to fail. After this PR, providing a small buffer will trigger a warning.

I've also added a bunch of new logging, which may be useful in the future. At least for defmt, the logs are opt-in, but I believe it is the case with env_logger, too.

From RFC 8446, Section 5.2

length: The length (in bytes) of the following
TLSCiphertext.encrypted_record, which is the sum of the lengths of
the content and the padding, plus one for the inner content type,
plus any expansion added by the AEAD algorithm. The length
MUST NOT exceed 2^14 + 256 bytes

@lulf lulf merged commit 4ba5d8b into main Sep 29, 2023
@bugadani bugadani deleted the docfix branch September 29, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants