Skip to content

Commit 98e1a40

Browse files
committed
[nrf fromtree] lib: tls_credentials: return size even if too big
The simple backend returns the size of the credential, even if it is too big. The secure backend should do the same, our libraries depend on this behaviour. Signed-off-by: Maximilian Deubel <[email protected]> (cherry picked from commit 916897f)
1 parent cb0d36f commit 98e1a40

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

subsys/net/lib/tls_credentials/tls_credentials_trusted.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ int tls_credential_get(sec_tag_t tag, enum tls_credential_type type,
401401

402402
if (info.size > *credlen) {
403403
ret = -EFBIG;
404+
*credlen = info.size;
404405
goto cleanup;
405406
}
406407

0 commit comments

Comments
 (0)