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

net: lib: tls_credentials: return size required #83137

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

plskeggs
Copy link
Contributor

If either no buffer is provided or the size of it is too small, return the required length.

pdgendt
pdgendt previously approved these changes Dec 18, 2024
Copy link
Collaborator

@pdgendt pdgendt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps would be nice to have this printed here:

if (err == -EFBIG) {
shell_fprintf(sh, SHELL_ERROR, "Not enough room in the credential buffer to "
"retrieve credential with sectag %d and type %s. "
"Increase TLS_CREDENTIALS_SHELL_MAX_CRED_LEN.\n",
sectag, cred_type_name(type));

rlubos
rlubos previously approved these changes Dec 18, 2024
@plskeggs plskeggs dismissed stale reviews from rlubos and pdgendt via 3cd558d December 18, 2024 18:43
@plskeggs plskeggs force-pushed the feature-credentials-size branch from 08bf34c to 3cd558d Compare December 18, 2024 18:43
@plskeggs plskeggs requested a review from pdgendt December 18, 2024 18:43
@plskeggs plskeggs force-pushed the feature-credentials-size branch from 3cd558d to d21e7ac Compare December 18, 2024 19:39
If either no buffer is provided or the size of it
is too small, return the required length.

Signed-off-by: Pete Skeggs <[email protected]>
@plskeggs plskeggs force-pushed the feature-credentials-size branch from d21e7ac to cbd88a2 Compare December 18, 2024 20:28
@kartben kartben merged commit 6ec5729 into zephyrproject-rtos:main Dec 20, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants