Change internal iop generate key error variable to int
instead of psa_status_t since the error variable get
passed to mbedtls_to_psa_error() when being returned
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
config_test_driver.h and
crypto_config_test_driver_extension.h are
configuration files thus they better fit in
mbedtls branches than in the framework.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Add ecp prefix to internal iop generate key function names
to emphasize that the functions are doing eliptic curves
keys only and not any other types.
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
Remove MBEDTLS_ECP_MAX_MPI_BYTES macro as
it's not needed anymore.It was added when
memcpy was being used but now that
mbedtls_mpi_write_binary() is being used
it can handle copying a large buffer filled
with leading zeros into a smaller buffer.
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
Some test build commands were moved to the CMakeLists.txt in the
tf-psa-crypto directory. Apply framework-related changes to this moved
section.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Remove mention of PSA_EXPORT_ASYMMETRIC_KEY_MAX_SIZE
since it's not yet add defined in our implementation
of PSA Crypto.
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
Incorrect usage of psa_key_id_t breaks ability to regenerate psa_sim
headers properly, should have been mbedtls_svc_key_id_t in the first
place, so replace with that.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
- Move the checks on the size to the start of the
function to avaoid costly calls to mbedtls_ecp_gen_privkey()
in case of invalid size.
- Improve the readability of error checking
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
Fix everest build following the merge of
9490. By the way removed an unnecessary
link of the everest lib to mbedtls test
executable. It comes through the mbedtls
library that gets it from the tfpsacrypto
library.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Move copy of crypto libraries to mbedtls as this
copy does not make sense in TF-PSA-Crypto context.
Also copy all of them, not just tfpsacrypto.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Rename mbedcrypto target to tfpsacrypto and
prefix all cmake related variables with
tfpsacrypto instead of mbedcrypto.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
The empty framework directory is temporary. It will be
removed when TF-PSA-Crypto uses its framework submodule.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
To avoid conflict between the two targets when
the integration of the TF-PSA-Crypto cmake build
system into the Mbed TLS one is completed.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
To avoid conflict between the two targets when
the integration of the TF-PSA-Crypto build system
into the Mbed TLS one is completed.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
Restrict the definition of memcheck/lcov targets
to the case where Mbed TLS/TF-PSA-Crypto is the
main project. To avoid conflict between the
targets when the integration of the TF-PSA-Crypto
build system into the Mbed TLS one is completed.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>