Skip to content

psa_crypto_driver_wrappers uses return instead of setting status #10035

@VitChmelarNXP

Description

@VitChmelarNXP

Summary

Inconsictency in psa_crypto_driver_wrappers

Some of functions in psa_driver_wrapper_verify_message are called with return, which creating unreachable code and skiping condition for PSA_ERROR_NOT_SUPPORTED
Seens on line 226 https://github.com/Mbed-TLS/mbedtls/blob/v3.6.2/scripts/data_files/driver_templates/psa_crypto_driver_wrappers.h.jinja#L226
Probably correct way of calling on line 208 https://github.com/Mbed-TLS/mbedtls/blob/v3.6.2/scripts/data_files/driver_templates/psa_crypto_driver_wrappers.h.jinja#L208

System information

Mbed TLS version (number or commit id): 3.6.2
Operating system and version: embedded
Configuration (if not default, please attach mbedtls_config.h):
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): N/A
Additional environment information:

Expected behavior

Actual behavior

Steps to reproduce

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcomponent-psaPSA keystore/dispatch layer (storage, drivers, …)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions