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.
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
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