Skip to content

Commit 4cef73d

Browse files
committed
Update output_length in trng_get_bytes() provided by psa.
1 parent 88f4f48 commit 4cef73d

File tree

1 file changed

+3
-1
lines changed
  • features/mbedtls/platform/TARGET_PSA/COMPONENT_NSPE/src

1 file changed

+3
-1
lines changed

features/mbedtls/platform/TARGET_PSA/COMPONENT_NSPE/src/psa_hrng.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ __WEAK int trng_get_bytes(trng_t *obj, uint8_t *output, size_t length, size_t *o
4848
mbedtls_psa_crypto_free();
4949

5050
((void)(obj));
51-
((void)(output_length));
51+
if (output_length != NULL) {
52+
*output_length = length;
53+
}
5254

5355
return 0;
5456
}

0 commit comments

Comments
 (0)