Declare more functions that do not need buffer copying

`psa_random_reseed()` is privileged. Hash, MAC and XOF are low-risk
per https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/795 .

Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
Gilles Peskine
2026-07-30 13:42:28 +02:00
parent 9ffe13506d
commit 01833c73be
@@ -150,7 +150,9 @@ class PSAWrapper(c_wrapper_generator.Base):
FUNCTIONS_NOT_REQUIRING_BUFFER_COPYING_RE = \
re.compile('|'.join([
'mbedtls_psa_inject_entropy', # privileged
'psa_(hash|mac|xof)_.*', # https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/795
'psa_crypto_driver_pake_get_.*', # no risk from simple getters
'psa_random_reseed', # privileged
]))
def _parameter_should_be_copied(self, function_name: str,
_buffer_name: Optional[str]) -> bool: