mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Merge branch 'mbedtls-2.28-restricted' into backport_asymmetric_encrypt_buffer_protection
Signed-off-by: tom-daubney-arm <74920390+tom-daubney-arm@users.noreply.github.com>
This commit is contained in:
@ -150,9 +150,14 @@ 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
|
||||
#pylint: disable=too-many-return-statements
|
||||
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'):
|
||||
@ -162,6 +167,18 @@ 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',
|
||||
'psa_mac_compute',
|
||||
'psa_mac_verify'):
|
||||
return True
|
||||
if function_name in ('psa_asymmetric_encrypt',
|
||||
'psa_asymmetric_decrypt'):
|
||||
return True
|
||||
|
Reference in New Issue
Block a user