Skip to content

Commit 916897f

Browse files
maxd-nordickartben
authored andcommitted
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 <maximilian.deubel@nordicsemi.no>
1 parent 618ec36 commit 916897f

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)