Manuel Pégourié-Gonnard
2336c8e929
Make -SE_C part of adjust_config
...
Several components needed to remove it, with the same comment every
time. It's probably just chance that other components happened to work
despite it being enabled.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-06-12 17:17:54 +02:00
Manuel Pégourié-Gonnard
8df87bf052
Group both configuration steps
...
Compared to the previous scheme, this avoid the problem of having to
warn about adjusting PSA_WANT in the wrong place.
Also, it allows enabling MBEDTLS_PSA_CRYPTO_CONFIG in adjust_config
rather than having to repeat it in every single component.
It also plays more nicely with components that have an associated
reference component and use a common config function. (Some of them were
already using the new order.)
Finally, "configure, build, run the tests" seems more natural than
"configure, build, configure, build, test" (and, coming back to the
initial point, it avoid questions about what to configure when).
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-06-12 17:09:38 +02:00
Waleed Elmelegy
46549cb5fa
Replace function calls in crypt_and_hash program with locals
...
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2023-06-12 14:53:02 +01:00
Manuel Pégourié-Gonnard
14f65a47c8
Merge pull request #7714 from daverodgman/sha3-update
...
SHA-3 update
2023-06-12 15:13:30 +02:00
Przemek Stekiel
1051f856dc
Re-enable MBEDTLS_DHM_C in tls13_only_psk, tls13_only_psk_ephemeral, tls13_only_psk_all
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com >
2023-06-11 20:32:28 +02:00
Dave Rodgman
f956312174
Fix typo in MBEDTLS_MD_CAN macros
...
Signed-off-by: Dave Rodgman <dave.rodgman@gmail.com >
2023-06-11 16:04:29 +01:00
Dave Rodgman
5c394ff203
Use a single fast-path in mbedtls_xor, gains around 1% in benchmarks
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-09 20:10:36 +01:00
Dave Rodgman
159dc099fd
Code style
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-09 19:46:07 +01:00
Dave Rodgman
c1fd0cf481
Merge pull request #7723 from tom-cosgrove-arm/fix-unterminated-pragma-clang-attribute-push
...
Fix "unterminated '#pragma clang attribute push'" in sha256/sha512.c
2023-06-09 17:24:23 +01:00
Dave Rodgman
0e22597871
Update Changelog
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-09 17:23:20 +01:00
Dave Rodgman
360e04f379
Fix AES-XTS perf regression
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-09 17:23:15 +01:00
Sergey
b57b048ea7
Fix error: comparison of integers of different signs: 'SOCKET' and 'int'
...
Signed-off-by: Sergey <sergio_nsk@yahoo.de >
2023-06-09 09:18:46 -07:00
Glenn Strauss
06c31fcd9f
x509_parse_time() perf
...
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com >
2023-06-09 17:02:35 +01:00
Glenn Strauss
4b2a6e8df3
Reuse time when verifying certificate chain
...
Replace mbedtls_x509_time_is_past(), mbedtls_x509_time_is_future()
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com >
2023-06-09 17:01:03 +01:00
Glenn Strauss
811eeb21d8
mbedtls_x509_time_gmtime() read struct directly
...
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com >
2023-06-09 17:01:03 +01:00
Glenn Strauss
61d99304da
mbedtls_x509_time_gmtime() to fill struct w/ time
...
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com >
2023-06-09 17:01:03 +01:00
Glenn Strauss
5aef2971e6
mbedtls_x509_time_cmp() perf
...
faster comparison of mbedtls_x509_time values with valid ranges per elt
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com >
2023-06-09 17:01:03 +01:00
Glenn Strauss
416dc03467
mbedtls_x509_time_cmp() compare mbedtls_x509_time
...
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com >
2023-06-09 17:01:03 +01:00
Waleed Elmelegy
7d39cc410c
Fix crypt_and_hash decrypt issue when used with stream cipher
...
crypt_and_hash decryption fails when used with a stream cipher
mode of operation due to the input not being multiple of block
size, this only applies to block cipher modes and not stream
ciphers.This change exempts CTR, CFB & OFB modes from this check.
Signed-off-by: Waleed Elmelegy <waleed.elmelegy@arm.com >
2023-06-09 16:58:23 +01:00
Dave Rodgman
f32176c0e3
Remove unnecessary cast
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-09 16:25:49 +01:00
Tom Cosgrove
6ec39cacaa
Remove the all.sh test for this, since armclang on CI is too old
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2023-06-09 15:34:31 +01:00
Tom Cosgrove
730addc203
Fix armc5-bin-dir and armc6-bin-dir options to all.sh
...
ARMC5_BIN_DIR and ARMC6_BIN_DIR were set in pre_parse_command_line() and used
by support_build_armcc() which is called by pre_initialize_variables() to
determines SUPPORTED_COMPONENTS.
As pre_initialize_variables() is called before pre_parse_command_line(),
support_build_armcc() failed to use the directories set on the command line.
However, we can't call pre_parse_command_line() before pre_initialize_variables()
since the former needs SUPPORTED_COMPONENTS!
Fix the circular dependency by parsing the command line twice, with the first
pass only to get these directories.
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2023-06-09 14:20:18 +01:00
Tom Cosgrove
579e6e9a05
Merge the two ARM Compiler 6 - Target ARMv8.2-A - AArch64 builds
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2023-06-09 13:46:19 +01:00
Tom Cosgrove
46ed3a9834
Add an all.sh build test that catches the unterminated pragmas
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2023-06-09 13:46:19 +01:00
Tom Cosgrove
ef2aa0ecad
Fix "unterminated '#pragma clang attribute push'" in sha256/sha512.c
...
If we're built with MBEDTLS_SHAxxx_USE_A64_CRYPTO_IF_PRESENT but don't have a
way to detect the crypto extensions required, the code turns off _IF_PRESENT
and falls back to C only (with a warning). This was done after the attributes
are pushed, and the pop is done only #if defined(xxx_IF_PRESENT), so this
commit fixes that.
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com >
2023-06-09 11:29:50 +01:00
Dave Rodgman
6d4933e54d
Replace use of MBEDTLS_SHA3_C with MBEDTLS_MD_CAN_SHA3_xxx
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-08 16:03:54 +01:00
Dave Rodgman
0442e1b561
Fix definition of MBEDTLS_MD_MAX_SIZE and MBEDTLS_MD_MAX_BLOCK_SIZE
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-08 16:03:33 +01:00
Kusumit Ghoderao
d9ec1afd13
Fix failing Ci
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-06-08 20:19:51 +05:30
Gilles Peskine
e5e8ba654e
Merge pull request #7666 from mprse/ip_info
...
OPC UA: parsing IP's in SubjectAltNames & printing info
2023-06-08 15:23:21 +02:00
Dave Rodgman
33701acf55
Fix test dependencies
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-08 13:48:42 +01:00
Gilles Peskine
36ee2e0fe8
Merge pull request #7706 from davidhorstmann-arm/gitignore-compile-commands-json
...
Add clangd compilation databases to gitignore
2023-06-08 14:37:26 +02:00
Gilles Peskine
95b43a04a9
Merge pull request #7651 from daverodgman/fix-armclang-compile-fail
...
Fix armclang compile fail
2023-06-08 14:36:18 +02:00
Kusumit Ghoderao
e5dd11164a
Edit changelog
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-06-08 16:43:32 +05:30
Kusumit Ghoderao
b31059f072
Remove negative tests for input validation
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-06-08 16:42:37 +05:30
Kusumit Ghoderao
109ee3de36
Use size of buffer for mac_size
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-06-08 16:36:45 +05:30
Kusumit Ghoderao
b821a5fd67
Use multipart mac operation for adding salt and counter
...
Signed-off-by: Kusumit Ghoderao <Kusumit.Ghoderao@silabs.com >
2023-06-08 16:35:55 +05:30
Manuel Pégourié-Gonnard
001cbc98bc
Make MD<->PSA translation static inline
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-06-08 12:10:03 +02:00
Manuel Pégourié-Gonnard
44176b00ad
Remove guarantee about converting NONE
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-06-08 12:10:02 +02:00
Manuel Pégourié-Gonnard
1f6d2e352d
Simplify implementation of MD<->PSA translation
...
Also, add tests and comments due from previous commits.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-06-08 12:09:20 +02:00
Xiaokang Qian
fcdd0477b3
Replace loop zeroise with memset
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-06-08 10:03:53 +00:00
Manuel Pégourié-Gonnard
47bb380f6d
Fix missing call to mbedtls_ssl_md_alg_from_hash()
...
I looked around and think this one the only place where a conversion was
missing.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-06-08 11:50:49 +02:00
Manuel Pégourié-Gonnard
9b76318138
Change values of md_type enum
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-06-08 11:48:53 +02:00
Janos Follath
035e5fc885
Add comments to 448 optimised reduction
...
Signed-off-by: Janos Follath <janos.follath@arm.com >
2023-06-08 09:44:30 +00:00
Xiaokang Qian
9cce348a70
Add corner case for p448 (A0+A1= full 1 of 448 bits)
...
Signed-off-by: Xiaokang Qian <xiaokang.qian@arm.com >
2023-06-08 09:19:40 +00:00
Dave Rodgman
9304186ae9
Restore accidentally removed comment
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-08 10:13:22 +01:00
Dave Rodgman
ff45d44c02
Replace MBEDTLS_MD_CAN_SHA3 with MBEDTLS_MD_CAN_SHA3_xxx
...
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com >
2023-06-08 10:11:34 +01:00
Manuel Pégourié-Gonnard
eb5920421c
Fix error status for PSA RSA-OAEP unknown hash
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-06-08 10:53:55 +02:00
Manuel Pégourié-Gonnard
70aa2a110e
Change contract of MD<->PSA conversion
...
This is preparation work for simplifying the implementation of those
functions. Done first in order to get the CI's opinion on it.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-06-08 10:53:54 +02:00
Manuel Pégourié-Gonnard
67f80372f0
Add size measurements per library
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-06-08 10:53:54 +02:00
Manuel Pégourié-Gonnard
7ae342f3f7
Use helper_libtestdriver1_adjust_config more
...
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com >
2023-06-08 09:26:55 +02:00