Commit graph

24594 commits

Author SHA1 Message Date
valerio
32f2ac9a18 test: proper positioning of USE_PSA_INIT + added missing exit labels
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-04-24 13:47:18 +02:00
valerio
cf35d774fe doc: update USE_PSA_CRYPTO description
Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-04-24 13:47:18 +02:00
Valerio Setti
285dae83dd test: fix USE_PSA_INIT/DONE for SSL test suite
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-24 13:47:18 +02:00
Valerio Setti
569c171015 test: fix USE_PSA_INIT/DONE for x509 test suite
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-24 13:47:18 +02:00
Valerio Setti
b79f7db9b0 test: fix USE_PSA_INIT/DONE for PK test suite
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-24 13:47:18 +02:00
Manuel Pégourié-Gonnard
feb941a77a
Merge pull request #7465 from valeriosetti/issue7460-part3
Check remaning dependencies on ECP in PK module
2023-04-24 13:06:09 +02:00
Manuel Pégourié-Gonnard
0281d7630b
Merge pull request #7449 from valeriosetti/issue7446
Clean up & improve PK write test functions
2023-04-24 13:05:16 +02:00
valerio
0b0486452c improve syms.sh script for external dependencies analysis
It is now possible to analyze also modules and not only
x509 and tls libraries.

Signed-off-by: valerio <valerio.setti@nordicsemi.no>
2023-04-24 10:34:08 +02:00
Valerio Setti
bf974b9b1c test_suite_pkwrite: replace memcpy with memmove
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-24 10:26:24 +02:00
Valerio Setti
547b3a4ab5 fix typos
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-24 10:24:37 +02:00
Valerio Setti
7bacaf859a fix new line difference in Windows
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-24 08:53:00 +02:00
Gilles Peskine
935a987b2b
Merge pull request #7436 from AndrzejKurek/x509-verify-san-ip
x509 SAN IP parsing
2023-04-21 22:00:58 +02:00
Paul Elliott
4bf08f86bb
Merge pull request #7425 from minosgalanakis/ecp/7257_ecp_mod_p224k1_add_test_cases
ECP: Add Unit Tests for secp224k1
2023-04-21 11:18:23 +01:00
Andrzej Kurek
90117db5dc Split a complex condition into separate ones
Make it more readable
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-04-18 10:43:35 -04:00
Minos Galanakis
357b9e1342 test_suite_ecp: Refactored ecp_mod_p224k1 to alignt with ecp_mod_p192k1
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-04-18 14:13:20 +01:00
Minos Galanakis
9d80879f90 ecp_curves: Introduced mbedtls_ecp_mod_p224k1()
This patch introduces a `MBEDTLS_STATIC_TESTABLE` helper
method which exposes `ecp_mod_p256k1()` to the test-framework

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-04-18 14:13:20 +01:00
Minos Galanakis
e5dab975c6 ecp_curves: Added unit-tests for secp224k1
This patch introduces basic unit-testing for the `ecp_mod_p224k1()`.

The method is exposed through the ecp_invasive interface, and
the standard testing data is being provided by the python framework.

Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2023-04-18 14:13:20 +01:00
Andrzej Kurek
af04f6307f Add an IPv4 mapped IPv6 test
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-04-18 07:26:59 -04:00
Andrzej Kurek
8bc2cc92b5 Refactor IPv6 parsing
Make it more readable
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-04-18 07:26:27 -04:00
Janos Follath
3c3b94a31b
Merge pull request #7424 from gabor-mezei-arm/7256_unit_tests_for_p192k1
Add unit tests for ecp_mod_p192k1()
2023-04-18 12:19:40 +01:00
Valerio Setti
2280895784 test: properly check written PEM buffer len
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-18 12:59:06 +02:00
Valerio Setti
232a006a46 test: fix extension in DER test files
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-18 12:53:19 +02:00
Manuel Pégourié-Gonnard
1b59e76a8f
Merge pull request #7431 from valeriosetti/issue7404
driver-only: ECP.PSA starter
2023-04-18 11:56:16 +02:00
Andrzej Kurek
ea3e71fa37 Further refactor IPv4 parsing
Make it more readable
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-04-18 05:54:50 -04:00
Valerio Setti
15cac17da5 test: fix dependencies in DER and PEM tests
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-18 11:32:58 +02:00
Valerio Setti
c9cb5324b7 test: specify input file type through enum
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-18 11:20:36 +02:00
Valerio Setti
8b7d4323da test: add Makefile target for the generated DER files
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-18 11:08:44 +02:00
Valerio Setti
3401b306ab test: use proper macros for checks
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-18 10:42:53 +02:00
Dave Rodgman
d455e90384
Merge pull request #7383 from yanesca/lts-lifetime-clarification
Clarify LTS lifetime
2023-04-17 18:18:30 +01:00
Valerio Setti
28567abf4f test: add DER file format for pkwrite tests
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-17 18:43:55 +02:00
Valerio Setti
c60bc5e700 test: add support for DER format in pkwrite tests
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-17 18:43:06 +02:00
Valerio Setti
8959095e87 test: memory footprint optimization for pkwrite tests
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-17 17:34:42 +02:00
Paul Elliott
4359badbb2
Merge pull request #7331 from mprse/ec-jpake-fix2
PSA PAKE: Check input_length against PSA_PAKE_INPUT_SIZE() in psa_pake_input
2023-04-17 16:31:09 +01:00
Ronald Cron
f54762e498
Merge pull request #7415 from Harshal5/fix/declaration_of_mbedtls_ecdsa_sign_det_restartable_function
ecdsa: fix `-missing-prototypes` warning when `MBEDTLS_ECDSA_SIGN_ALT` is defined
2023-04-17 15:41:25 +02:00
Gabor Mezei
cec506083b
Fix test case dependency
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2023-04-17 14:56:03 +02:00
Przemek Stekiel
7921a03425 Add claryfication for PSA_PAKE_INPUT/OUTPUT_MAX_SIZE macros
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-04-17 12:32:06 +02:00
Valerio Setti
2dbc3066c7 test: remove useless ECP_LIGHT guard in psa_exercise_key
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-17 12:03:48 +02:00
Valerio Setti
e618cb0a0b test: add coverage's analysis framework for accel EC algs w/o ECP
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-17 12:03:48 +02:00
harshal.patil
8c77644906 ecdsa: fix -missing-prototypes warning when MBEDTLS_ECDSA_SIGN_ALT is defined
- In `mbedtls/v3.4.0`, ECDSA restartable sign and verify functions (`ecdsa.c`) were made public.
- But the `mbedtls_ecdsa_sign_det_restartable` function prototype was declared in the file `ecdsa.h`,
  only when `MBEDTLS_ECDSA_SIGN_ALT` is not defined.

Signed-off-by: harshal.patil <harshal.patil@espressif.com>
2023-04-17 12:53:00 +05:30
Manuel Pégourié-Gonnard
ed5998cd7d
Merge pull request #7422 from valeriosetti/remove-psa-have-full-symbols
Remove PSA_HAVE_FULL_xxx symbols
2023-04-17 09:19:00 +02:00
Stephan Koch
48fba6fbac Fix so that PSA_WANT_ALG_DETERMINISTIC_ECDSA implies PSA_HAVE_FULL_ECDSA.
Signed-off-by: Stephan Koch <koch@oberon.ch>
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
2023-04-14 13:41:10 +02:00
Manuel Pégourié-Gonnard
6942cc3da7
Merge pull request #7410 from valeriosetti/issue7390
Define (private) "light" subset of ECP
2023-04-14 13:24:06 +02:00
Tom Cosgrove
7b515feabc
Merge pull request #7440 from daverodgman/fix-big-endian-alignment-tests
Test fixes for big-endian
2023-04-13 18:23:13 +01:00
Dave Rodgman
f33c7e3344 Code style
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-04-13 15:34:43 +01:00
Dave Rodgman
9145dc46ed Ensure variables initialised
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-04-13 15:00:07 +01:00
Dave Rodgman
c07df36f9e More fixes for big-endian
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2023-04-13 14:54:12 +01:00
Andrzej Kurek
6cbca6dd42 Rename a variable in ipv4 and ipv6 parsing
Character was too elaborate.
p is used in other x509 code to step through data.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-04-13 09:25:00 -04:00
Andrzej Kurek
0d57896f7e Refactor ipv6 parsing
Introduce new variables to make it more readable. Clarify the calculations a bit.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-04-13 09:20:31 -04:00
Andrzej Kurek
7f5a1a4525 Rename ipv6 parsing variables, introduce one new one
This way the names are more descriptive.
j was reused later on for calculation, 
num_zero_groups is used instead.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-04-13 09:20:23 -04:00
Andrzej Kurek
06969fc3a0 Introduce a test for a sw implementation of inet_pton
Create a bypass define to simulate platforms
without AF_INET6.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2023-04-13 09:20:15 -04:00