Przemek Stekiel
1969f6a453
Test optional fields in authorityKeyId
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
0ad1006606
Check values in tests
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
2568d47916
Use generated certs in DER format in tests
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Przemek Stekiel
5ff986cb0a
Provide makefile rules to generate cerst for authorityKeyId, subjectKeyId tests
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-07 09:01:29 +02:00
Gilles Peskine
13230a4ad3
Merge pull request #7349 from mpg/rm-hash-info
...
Remove `hash_info` module
2023-06-06 21:05:13 +02:00
Gilles Peskine
d598eaf212
Merge pull request #7106 from davidhorstmann-arm/parse-oid-from-string
...
Parse an OID from a string
2023-06-06 20:57:17 +02:00
Gilles Peskine
a5cd318137
Merge pull request #7670 from lpy4105/issue/fix-wrong-command-for-ec-key-files
...
Fix invalid commands for ec_x{25519,448}_{prv,pub}.{der,pem}
2023-06-06 20:56:52 +02:00
Gilles Peskine
259903b179
Merge pull request #7643 from lpy4105/issue/renew_cert_2024-01-01
...
Updating crt/crl files due to expiry before 2024-01-01
2023-06-06 20:55:23 +02:00
Kusumit Ghoderao
28daefab07
Fix fall through warning
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 16:31:39 +05:30
Przemek Stekiel
4d3fc216fc
Use safe snprintf
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-06 11:44:25 +02:00
Przemek Stekiel
63973ab80e
Add test for invalid IP length (+use der format in tests)
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-06 11:44:25 +02:00
Przemek Stekiel
01cb6eb251
Fix parsing of SAN IP (use mbedtls_snprintf, validate buffer length)
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-06 11:44:25 +02:00
Przemek Stekiel
093c97d492
Add separate case for ip address
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-06 11:44:25 +02:00
Przemek Stekiel
63a4cdd1eb
Add test to parse ipV4 and ipV6 addresses
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-06 11:44:25 +02:00
Przemek Stekiel
0ab5b93922
Add support for parsing SAN IP address
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2023-06-06 11:44:25 +02:00
Gilles Peskine
265ce7c1da
Merge pull request #5451 from gilles-peskine-arm/psa-driver-kdf-spec
...
PSA drivers: specification for key derivation
2023-06-06 11:37:28 +02:00
Kusumit Ghoderao
f28e0f5bed
Fix code style
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:48 +05:30
Kusumit Ghoderao
354434c466
Add changelog entry
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:47 +05:30
Kusumit Ghoderao
c63d140436
Add negative cases for pbkdf2 output
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:45 +05:30
Kusumit Ghoderao
2b5c91b757
Add RFC tests for pbkdf2 output
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:44 +05:30
Kusumit Ghoderao
e70a8bbb08
Change derive_input test cases for implemented output_bytes
...
The tests earlier reported PSA_ERROR_NOT_SUPPORTED as final output as
the output_bytes function was not implemented for pbkdf2. The test
cases have now been modified to the correct error codes.
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:43 +05:30
Kusumit Ghoderao
81797fc270
Add cost and password steps to derive_output_test function
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:42 +05:30
Kusumit Ghoderao
f6a0d57e4d
Add pbkdf2 function to key_derivation_output_bytes
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:41 +05:30
Kusumit Ghoderao
a4346cdc50
Add pbkdf2_generate_block function
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:39 +05:30
Kusumit Ghoderao
85e6bdb7ad
Add additional members to pbkdf2 struct
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com>
2023-06-06 15:05:39 +05:30
Manuel Pégourié-Gonnard
d4dff8b4de
Update FFDH component
...
Was added while I was preparing this PR.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 11:19:37 +02:00
Manuel Pégourié-Gonnard
f5c5d971e7
Add documentation about libtestdriver1 usage
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 11:15:20 +02:00
Manuel Pégourié-Gonnard
239094d51c
all.sh: make libtestdriver1 components more uniform
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 11:15:20 +02:00
Manuel Pégourié-Gonnard
27dd73fb91
all.sh: add helper_libtestdriver1_make_main()
...
Also, remove things that are redundant with ASAN_CFLAGS (-Werror, -O).
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 11:15:20 +02:00
Manuel Pégourié-Gonnard
31639e49d2
all.sh: add helper_libtestdriver1_make_drivers()
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 11:15:20 +02:00
Manuel Pégourié-Gonnard
27e1767c44
all.sh: add helper_libtestdriver1_adjust_config
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 11:15:20 +02:00
Manuel Pégourié-Gonnard
cf61a74209
Add static check for macros that should be in sync
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
c9d9829533
Add comment on macros that should be kept in sync
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
f76c2208f6
Remove mbedtls_psa_translate_md().
...
The header clearly states all functions here are internal, so we're free
to remove them at any time.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
45b34517fb
Keep MD and PSA max size in sync
...
Some TLS code is using MD_MAX_SIZE in parts that are common to USE_PSA
and non-USE_PSA, then using PSA_HASH_MAX_SIZE in parts specific to
USE_PSA, and having different values causes trouble.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
28f504e892
Use PSA-neutral function for availability check
...
We just want to check if this hash is available, and the check is
present in builds both with PSA and without it. The function we were
using is only present in builds with PSA, so it wasn't appropriate.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
725d2e24aa
Fix guard for PSA->MD error conversion
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
b3b54abf8a
Fix duplicated definition of a function
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
3761e9e8fd
Use function instead of macro for error conversion
...
tests/scripts/all.sh build_arm_none_eabi_gcc_m0plus | grep TOTALS
Before: 323003
After: 322883
Saved: 120 bytes
Not huge, but still nice to have.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
a14b8f0a17
Add total when printing sizes in all.sh
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
02b10d8266
Add missing include
...
Fix build failures with config full
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
ddbf61a938
Use general framework for PSA status conversion
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
1c32e37b0c
Formally deprecate mbedtls_psa_translate_md()
...
The previous informal comment was not enough to prevent it from being
used in several places in the library. This should have more effect,
considering with have builds with DEPRECATED_REMOVED.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
1f2a587cdf
Use actual function instead of static inline
...
Large static inline functions used from several translation units in the
library are bad for code size as we end up with multiple copies. Use the
actual function instead. There's already a comment that says so.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
6076f4124a
Remove hash_info.[ch]
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
2d6d993662
Use MD<->PSA functions from MD light
...
As usual, just a search-and-replace plus:
1. Removing things from hash_info.[ch]
2. Adding new auto-enable MD_LIGHT in build-info.h
3. Including md_psa.h where needed
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
36fb12e7dd
Add MD <-> PSA translation functions to MD light
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
1b180bec40
Remove unused function
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
8857984b2f
Replace hash_info macro with MD macro
...
Now the MD macro also accounts for PSA-only hashes.
Just a search-and-replace, plus manually removing the definition in
hash_info.h.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00
Manuel Pégourié-Gonnard
9b41eb8533
Replace hash_info_get_type with MD function
...
Mostly a search and replace with just two manual changes:
1. Now PK and TLS need MD light, so auto-enable it.
2. Remove the old function in hash_info.[ch]
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2023-06-06 10:33:54 +02:00