Valerio Setti
2fd9572f27
psasim-server: add function to reset operations slots
...
When the client disconnects the server can clean operations slots
so that upcoming clients will not hit the maximum slot limit
(at least it's very unlikely to happen for normal clients).
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-18 11:00:17 +02:00
Tom Cosgrove
7c52100fbd
Merge pull request #9238 from tom-cosgrove-arm/psasim_update_for_operation_types
...
Update PSA simulator C code to do operations by handles
2024-06-13 10:13:40 +00:00
Tom Cosgrove
f41272099b
Merge pull request #9242 from sezrab/fix-function-parameter
...
Fix incorrect array length in function prototype
2024-06-13 07:55:50 +00:00
Tom Cosgrove
a0cfe01bb7
Merge pull request #9241 from lhuang04/official_development_psk_null2
...
Set psk to NULL in ssl_psk_remove
2024-06-12 12:00:34 +00:00
Tom Cosgrove
0fe5b8d4a3
Add support for and run (a copy of) the PSA aead_demo program under PSA sim
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-11 17:26:17 +01:00
Tom Cosgrove
98760124b8
Make it possible to pass arguments to PSA sim psa_client
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-11 17:21:15 +01:00
Tom Cosgrove
b923b473e7
Have PSA sim client wrappers say which call fails, if one does
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-11 17:19:31 +01:00
Gilles Peskine
797991dd51
Merge pull request #9149 from gilles-peskine-arm/ssl-test-no-skip-all
...
ssl-opt.sh, compat.sh: Error out if not executing any tests
2024-06-11 13:59:09 +00:00
Ronald Cron
0133d84a3d
Merge pull request #9199 from tom-daubney-arm/modify_test_everest_curve25519_only_for_psa
...
Make everest component work with PSA_CRYPTO_CONFIG set
2024-06-11 13:58:00 +00:00
Sam Berry
3504c88916
Fix incorrect array length in function prototype
...
Issue #9179 (MBEDTLS_SSL_CID_OUT_LEN_MAX changed to
MBEDTLS_SSL_CID_IN_LEN_MAX in library\ssl.h and library\ssl_tls.c)
Signed-off-by: Sam Berry <sam.berry@arm.com>
2024-06-11 14:46:31 +01:00
Valerio Setti
f98635c360
psasim: build server library and binary before client's ones
...
This allows to keep the same CONFIG_H while building the Mbed TLS
library and the application (no matter if it's client or server).
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-11 14:26:42 +01:00
Valerio Setti
75129e2ce3
psa_sim_crypto_[client/server]: check if CRYPTO_C is enabled
...
CRYPTO_C must or must-not be enabled on client and server
sides as follows:
- if it's enabled while building the client side it's a failure;
- it it's NOT enabled while building the server it's a failure.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-11 14:26:36 +01:00
Tom Cosgrove
51b2c86852
Use our own copy of programs/psa/psa_hash.c in the PSA simulator tests
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-11 14:26:03 +01:00
Tom Cosgrove
5ddd6591c3
Revert "Correctly build client-side code that's to be run under the PSA crypto sim"
...
This reverts commit e7a2230df7e9468f3a276edabe20a0705a492940.
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-11 14:26:03 +01:00
lhuang04
54adeab866
set psk to null in ssl_psk_remove
...
Summary:
set the psk to null after it is released.
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags:
Signed-off-by: lhuang04 <lhuang04@fb.com>
2024-06-10 12:17:11 -07:00
Tom Cosgrove
c9ab3677a2
Merge pull request #9225 from gilles-peskine-arm/tls13-debug-print-uint32-fix
...
Fix uint32_t printed as unsigned int
2024-06-10 15:13:40 +00:00
Tom Cosgrove
f252f61611
psa_sim_serialise.pl now creates the updated .c file
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 15:50:53 +01:00
Tom Cosgrove
db87a44898
psa_sim_serialise.pl now creates the updated .h file
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 15:50:13 +01:00
Tom Cosgrove
0d0415e6e0
Move the comment block in psa_sim_serialise.c back to where it belongs
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 15:49:02 +01:00
Tom Cosgrove
9ab19695b5
Make psa_sim_generate.pl output the new type of server wrapper we want
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 14:24:28 +01:00
Tom Cosgrove
517f4a1b4d
Store operation_ts on PSA sim server side; only send handle to client
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 14:08:04 +01:00
Tom Cosgrove
d6048a459c
We want the PSA hash code if MBEDTLS_PSA_CRYPTO_CLIENT && !MBEDTLS_PSA_CRYPTO_C
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 14:07:26 +01:00
Tom Cosgrove
e7a2230df7
Correctly build client-side code that's to be run under the PSA crypto sim
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-06-10 14:07:26 +01:00
Bence Szépkúti
d28534c5b0
Merge pull request #9062 from tom-daubney-arm/crypto_config-tls1_2_default_stream_cipher_only_use_psa
...
Make TLS 1.2 components work with PSA_CRYPTO_CONFIG set
2024-06-10 11:54:37 +00:00
Bence Szépkúti
2bceec830a
Merge pull request #9227 from davidhorstmann-arm/check-framework-python-files
...
Extend python checks to framework scripts
2024-06-10 11:33:27 +00:00
Ronald Cron
4ac0182cae
Merge pull request #9233 from davidhorstmann-arm/make-code-style-work-in-commit-hook
...
Allow `code_style.py` to work from a git hook
2024-06-07 14:07:31 +00:00
David Horstmann
8493452d6f
Extend python checks to framework scripts
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-06-07 11:09:31 +01:00
David Horstmann
f8bbc2d532
Remove multi-type variable
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-06-06 16:16:31 +01:00
David Horstmann
330680e9fe
Allow code_style.py to work from a git hook
...
When running a git hook, git sets certain environment variables (such
as GIT_INDEX_FILE) which force git to look at the main repository,
overriding other options. This trips up code_style.py whenever it
tries to run a git command on the framework submodule.
Fix this by explicitly clearing git-related environment-variables
before running git commands on the framework. This is recommended
by git's documentation[1]:
> Environment variables, such as GIT_DIR, GIT_WORK_TREE, etc., are
> exported so that Git commands run by the hook can correctly locate
> the repository. If your hook needs to invoke Git commands in a
> foreign repository or in a different working tree of the same
> repository, then it should clear these environment variables so
> they do not interfere with Git operations at the foreign location.
[1] https://git-scm.com/docs/githooks
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-06-06 15:25:10 +01:00
Gilles Peskine
69770aaa7b
Use unsigned long rather than size_t for format string readability
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-05 20:54:42 +02:00
Bence Szépkúti
c085cc767d
Merge pull request #9200 from davidhorstmann-arm/move-test-generation-files
...
Move test generation files to framework
2024-06-04 09:23:17 +00:00
Gilles Peskine
a9d4ef0998
Fix uint32_t printed as unsigned int
...
This is ok in practice since we don't support 16-bit platforms, but it makes
`arm-none-eabi-gcc-10 -mthumb -Wformat` complain.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-06-03 22:16:23 +02:00
David Horstmann
fd59a06165
Update to latest framework
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-06-03 18:18:49 +01:00
Tom Cosgrove
98ffc8e7c3
Merge pull request #9178 from valeriosetti/fix-psa-cmac
...
adjust_legacy_crypto: enable CIPHER_C when PSA CMAC is builtin
2024-06-03 15:35:32 +00:00
Tom Cosgrove
e2add3ac08
Merge pull request #9220 from valeriosetti/fix-psa-doc
...
fix documentation of psa_hash_compare()
2024-06-03 15:34:19 +00:00
Valerio Setti
351efa0ece
crypto.h: fix documentation for some functions
...
Some functions has input parameters which are erroneously
reported as "param[out]" in the documentation. This commit
fixes them.
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-06-03 11:17:37 +02:00
David Horstmann
ce7af04795
Update framework submodule
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-31 15:49:02 +01:00
David Horstmann
f6f3bcae43
Update file paths for moved files
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-31 15:49:02 +01:00
David Horstmann
a7b0bb4de8
Move some test generation files to framework
...
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-31 15:49:02 +01:00
David Horstmann
b8360cf3ca
Make abi_check.py look in both locations
...
To deal with situations where we are comparing revisions before and
after the move of generate_psa_tests.py to the framework, look for
it in both the old and new locations.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
2024-05-31 15:48:55 +01:00
Valerio Setti
7e2ce99400
changelog: add changelog for PSA CMAC fix
...
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2024-05-31 14:52:54 +02:00
Tom Cosgrove
30a9b6f2fc
Merge pull request #9198 from tom-cosgrove-arm/psa-sim-hashing
...
Test psa_hash_xxx() APIs in the PSA crypto simulator
2024-05-31 11:13:55 +00:00
Gilles Peskine
ea297e5870
Merge pull request #9061 from gilles-peskine-arm/config-headers-do-not-include
...
Document check-config.h and *adjust*.h as internal headers
2024-05-31 07:32:39 +00:00
Gilles Peskine
d961929615
Merge pull request #9155 from ttytm/fix-typo
...
fix typo
2024-05-30 17:24:55 +00:00
Gilles Peskine
8c60b16188
Merge pull request #8643 from gilles-peskine-arm/tls12_server-pk_opaque-dead_code
...
Guard configuration-specific code in ssl_tls12_server.c
2024-05-30 17:24:33 +00:00
Gilles Peskine
c15544e217
Merge pull request #9088 from ronald-cron-arm/check-framework-files
...
Extend basic checks and C coding style check to framework files
2024-05-30 17:24:18 +00:00
Thomas Daubney
f29bf87696
Modify everest component for MBEDTLS_PSA_CRYPTO_CONFIG_ENABLED
...
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2024-05-30 16:28:57 +01:00
Tom Cosgrove
0ca70d51d7
Add missing licences
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-30 11:12:22 +01:00
Tom Cosgrove
8bfb758e87
PSA crypto sim's server wrappers need to free deseraliased buffers when they're no longer needed
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-29 22:48:45 +01:00
Tom Cosgrove
ca0c147354
Mark temporary PSA crypto sim Perl scripts as executable
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2024-05-29 16:52:38 +01:00