Paul Elliott
b1039afbd0
Regenerate PSA Sim headers
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2024-11-15 14:09:03 +00:00
Paul Elliott
958bdf7f16
Add required code to psa_sim_generate.pl
...
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>
2024-11-15 14:09:03 +00:00
Waleed Elmelegy
a2891a9ac9
Add PSA interuptable key agreement APIs
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com>
2024-11-06 16:03:46 +00:00
Harry Ramsey
c0240b314f
Fix formatting issue
...
This commit fixes a formatting issue where whitespace was added at the
end of lines.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-10-21 18:38:15 +01:00
Harry Ramsey
8b3f513c0a
Fix linking error for mbedtls_test_hook_error_add
...
This commit fixes a linking error with psa_sim_crypto_server.c where
mbedtls_test_hook_error_add was undefined.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-10-21 14:49:57 +01:00
Harry Ramsey
d617283187
Fix failing psasim tests
...
This commit fixes failing psasim tests by ensuring that
MBEDTLS_VERSION_C is defined before attempting to access version
information.
Signed-off-by: Harry Ramsey <harry.ramsey@arm.com>
2024-10-07 14:50:00 +01:00
Tom Cosgrove
195e1647b2
Merge pull request #9427 from valeriosetti/psasim-small-fixes
...
psasim: small fixes to all.sh and test bash scripts
2024-08-07 13:13:46 +00:00
Valerio Setti
2016d66741
psasim: small fixes to all.sh and test bash scripts
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-08-06 11:52:00 +02:00
Gilles Peskine
7db1bcdb34
Update generated PSA wrappers
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +02:00
Gilles Peskine
fd46f7f173
Migrate psasim wrappers to psa_custom_key_parameters_t
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-05 15:52:37 +02:00
Gilles Peskine
4b3b4fe56e
Remove cruft and update documentation
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-02 12:42:01 +02:00
Gilles Peskine
4c3ff16431
Enhance existing skip mechanism instead of duplicating it
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-08-01 16:40:49 +02:00
Gilles Peskine
2e9a7eef2c
Parse the actual headers
...
Parse the actual header instead of a copy that's going to get out of date
very soon.
No change to the generated output.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-07-31 21:21:31 +02:00
Gilles Peskine
2910f4d61b
Write output files to the expected directory
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-07-31 21:21:31 +02:00
Ronald Cron
7262b47d79
all.sh: psasim: Start server in tf-psa-crypto/tests
...
Start a server in tf-psa-crypto/tests in addition to
tests to be able to run test suites from
tf-psa-crypto/tests.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-22 12:29:23 +02:00
Ronald Cron
0b796a42e6
psasim: Rename kill_server.sh to kill_servers.sh
...
Rename kill_server.sh to kill_servers.sh as it
kills all started PSA servers.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-22 12:29:23 +02:00
Ronald Cron
e0e26f7d8e
psasim: Move file clean-up to all.sh
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-22 12:29:23 +02:00
Ronald Cron
594ab41893
psasim: Fix IPCs removal
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-22 12:29:23 +02:00
Ronald Cron
3943467863
psasim: Fix doorbell file path
...
Do not apply twice TMP_FILE_BASE_PATH
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-22 12:29:23 +02:00
Ronald Cron
c04c2ed2eb
Revert "Adapt psasim"
...
This reverts commit b6f6cc89d0
.
The usage of files /tmp/ could result in race conditions if
several several are run on the same machine.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-22 12:29:17 +02:00
Ronald Cron
b6f6cc89d0
Adapt psasim
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-19 10:07:27 +02:00
Tom Cosgrove
caee58f559
psasim: add a bit of white-box testing to hash operations
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-07-02 15:45:55 +02:00
Valerio Setti
f67ded3488
psasim: update bash scripts
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-07-02 15:45:55 +02:00
Valerio Setti
0917265014
makefile: allow to build and link test suites against psasim
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-07-02 15:45:55 +02:00
Valerio Setti
6271004da9
psasim: remove sleep on server side to make test as fast as possible
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-07-02 11:40:48 +02:00
Tom Cosgrove
7cdb1dde60
psasim: invalidate operations on abort+finish
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-07-02 11:40:48 +02:00
Valerio Setti
7fe75ba72d
psasim: minor fixes to the core
...
- do not try to close a connection that was never started
- fix data chunks length for psa_write (prevent memcpy-ing
to large blocks of data)
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-07-02 11:40:48 +02:00
Ronald Cron
3d817add46
Adjust build systems
...
Adjust build systems such as we can built
Mbed TLS in the default and full configuration.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2024-07-01 14:59:35 +02:00
Valerio Setti
4848f9d64f
psasim: fix max line length in generated files
...
Prevent generated files from having lines longer than 100 chars which
would trigger CI failures on code style checks.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:18:01 +02:00
Valerio Setti
9dc928990f
psasim: add AUT for asymmetric encryption/decryption
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:17:51 +02:00
Valerio Setti
e9829e59c5
psasim: add AUT for cipher encryption/decryption
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:17:32 +02:00
Valerio Setti
87be9db668
psasim: add AUT for key derivation
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:17:32 +02:00
Valerio Setti
a06b22d709
psasim: add AUT for symmetric encryption/decryption
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:17:13 +02:00
Valerio Setti
bb1502b804
psasim: add AUT for PSA sign and verify
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:16:50 +02:00
Valerio Setti
6d6fe8b2d5
psasim: add AUT for key generation and raw key agreement
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:16:39 +02:00
Valerio Setti
f79e17a3d5
psasim: add AUT for MAC
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:16:25 +02:00
Valerio Setti
25afdc1309
psasim: add AUT for psa_generate_random()
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:16:00 +02:00
Valerio Setti
5beb236835
psasim: merge all AUT programs into a single executable
...
This makes both building and testing much faster.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-25 14:15:30 +02:00
Tom Cosgrove
d32fac276d
psasim: have the generator script check for type = "void" rather than name = "(void)"
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:03:01 +02:00
Tom Cosgrove
4d8d5569d8
psasim: add support for psa_reset_key_attributes()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:10 +02:00
Tom Cosgrove
feb021695a
psasim: add support for psa_copy_key()
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:10 +02:00
Tom Cosgrove
05c99e13e6
psasim: add support for psa_{sign,verify}_hash_xxx() and get/set max ops
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:09 +02:00
Tom Cosgrove
9b10cf7e39
psasim: add support for PSA functions that return uint32_t or void
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:08 +02:00
Tom Cosgrove
1a8b805cf5
psasim: add support for key functions that don't need psa_key_attributes_t
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:08 +02:00
Tom Cosgrove
8f1c913e38
psasim: add support for psa_asymmetric_{encrypt,decrypt}() to the simulator
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:07 +02:00
Tom Cosgrove
6add43aac8
psasim: add support for psa_{sign,verify}_{message,hash}() to the simulator
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:06 +02:00
Tom Cosgrove
5d4b9cb2e2
psasim: add support for psa_generate_key*() to the simulator
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:06 +02:00
Tom Cosgrove
c3236b85da
psasim: add support for psa_key_derivation_xxx() and psa_raw_key_agreement() to the simulator
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:05 +02:00
Tom Cosgrove
623fcb37d6
psasim: add the ability to serialise psa_key_production_parameters_t
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:04 +02:00
Tom Cosgrove
a2d81c9fb6
psasim: psa_key_derivation_verify_bytes() doesn't follow the naming convention for a buffer, so override
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-24 08:02:04 +02:00