The fuzzer needs both kinds of test helper so needs to include things
from both new and old locations.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
These must include from both the framework and the main repository since
the test helpers straddle the two locations.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
Everything not TLS-related and not ALT-interface-related has been moved
out of tests/src and tests/include and into the framework, except for
the PSA test wrappers.
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>
Non generated code was unfortnuately added to psa_sim_crypto_server.c,
fix that by adding it to the generation scripts.
Signed-off-by: Paul Elliott <paul.elliott@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>
Add MBEDTLS_ECP_MAX_MPI define to determine the maximum
number of bytes for the biggest Elliptic curve in bignum
representation.
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
* Used bignum helper API instead of memcpy
* changed the key length output to the size of the curve because:
- using the bignum produces a bigger size than the curve size
due to the limb size being 8 bytes and import key rejects
the key if it's not exactly curve size.
- we know that the generated key is filled with leading
zeros becuase the generated key is bounded by the modulas.
* skipped leading zeros when passing the buffer to import_key()
due to the intermediate buffer allocated to the maximum size
possible and import_key() needs the exact size.
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>