mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Merge branch 'development-restricted' into mac_buffer_protection
Signed-off-by: tom-daubney-arm <74920390+tom-daubney-arm@users.noreply.github.com>
This commit is contained in:
@ -142,9 +142,13 @@ class PSAWrapperGenerator(c_wrapper_generator.Base):
|
||||
_buffer_name: Optional[str]) -> bool:
|
||||
"""Whether the specified buffer argument to a PSA function should be copied.
|
||||
"""
|
||||
# Proof-of-concept: just instrument one function for now
|
||||
if function_name.startswith('psa_aead'):
|
||||
return True
|
||||
if function_name == 'psa_cipher_encrypt':
|
||||
return True
|
||||
if function_name in ('psa_key_derivation_output_bytes',
|
||||
'psa_key_derivation_input_bytes'):
|
||||
return True
|
||||
if function_name in ('psa_import_key',
|
||||
'psa_export_key',
|
||||
'psa_export_public_key'):
|
||||
@ -154,6 +158,12 @@ class PSAWrapperGenerator(c_wrapper_generator.Base):
|
||||
'psa_sign_hash',
|
||||
'psa_verify_hash'):
|
||||
return True
|
||||
if function_name in ('psa_hash_update',
|
||||
'psa_hash_finish',
|
||||
'psa_hash_verify',
|
||||
'psa_hash_compute',
|
||||
'psa_hash_compare'):
|
||||
return True
|
||||
if function_name in ('psa_mac_update',
|
||||
'psa_mac_sign_finish',
|
||||
'psa_mac_verify_finish',
|
||||
|
Reference in New Issue
Block a user