1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Merge branch 'development-restricted' into generate-random-buffer-protection

Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
David Horstmann
2024-02-29 14:25:56 +00:00
committed by GitHub
3 changed files with 147 additions and 21 deletions

View File

@ -142,6 +142,7 @@ class PSAWrapperGenerator(c_wrapper_generator.Base):
_buffer_name: Optional[str]) -> bool:
"""Whether the specified buffer argument to a PSA function should be copied.
"""
#pylint: disable=too-many-return-statements
if function_name.startswith('psa_aead'):
return True
if function_name == 'psa_cipher_encrypt':
@ -166,6 +167,15 @@ class PSAWrapperGenerator(c_wrapper_generator.Base):
return True
if function_name == 'psa_generate_random':
return True
if function_name in ('psa_mac_update',
'psa_mac_sign_finish',
'psa_mac_verify_finish',
'psa_mac_compute',
'psa_mac_verify'):
return True
if function_name in ('psa_asymmetric_encrypt',
'psa_asymmetric_decrypt'):
return True
return False
def _write_function_call(self, out: typing_util.Writable,