Manuel Pégourié-Gonnard
35c09e4824
Introduce compute_hash() function
...
This allows callers not to worry with md_info and makes it easier to
provide a PSA version for when MD_C is not available.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-08-11 12:47:02 +02:00
Manuel Pégourié-Gonnard
f701acc088
Extract common code into hash_mprime()
...
This will also make it easier to provide a PSA-based version for when MD
is not available.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-08-11 12:47:02 +02:00
Manuel Pégourié-Gonnard
f3a6755450
Simplify callers of mgf_mask()
...
Some of them no longer need md_ctx, some of those no longer need the
exit dance that was used to free it, or need it on a smaller scope.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-08-11 12:47:02 +02:00
Manuel Pégourié-Gonnard
259c213545
Tune API of internal function mgf_mask in RSA
...
This is a first step towards making a version of this function that
uses PSA when MD is not available.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-08-11 12:47:02 +02:00
Dave Rodgman
8a9f88899d
Merge pull request #6186 from leorosen/ssl_tls_null_on_invalid_code
...
ssl_tls: avoid the appearance of a potential NULL dereferencing
2022-08-11 10:12:34 +01:00
Dave Rodgman
322a7a19e7
Merge pull request #6155 from yuhaoth/pr/add-any-all-configs-enabled
...
Add ability to check if any/all configs are enabled/disabled for ssl-opt
2022-08-11 09:40:38 +01:00
Jerry Yu
62c8763de7
Improve macro expansion help message
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-08-11 10:18:36 +08:00
Jerry Yu
08dccc1f75
Improve help message
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-08-10 10:02:04 +08:00
Leonid Rozenboim
e9d8dcdbf5
ssl_tls: avoid the appearance of a potential NULL dereferencing
...
Looking at the bigger picture it is clear that if `ssl->session` is NULL,
there will be a failure much earlier, and that is well protected from,
however, the practice of dereferencing a pointer which has not been
verified in prior for validity goes against secure coding practices.
Signed-off-by: Leonid Rozenboim <leonid.rozenboim@oracle.com>
2022-08-09 12:34:30 -07:00
Dave Rodgman
f421d45869
Merge pull request #6139 from AdityaHPatwardhan/fix/build_error_due_to_missing_prototype
...
Fix build error due to missing prototype warning when `MBEDTLS_DEPRECATED_REMOVED` is enabled
2022-08-09 11:27:42 +01:00
Dave Rodgman
384f1e61f7
Merge pull request #5950 from savent404/development
...
cmake: IAR support option( MBEDTLS_FATAL_WARNINGS)
2022-08-09 10:52:31 +01:00
Dave Rodgman
953ce3962f
Merge pull request #5971 from yuhaoth/pr/add-rsa-pss-rsae-for-tls12
...
Add rsa pss rsae for tls12
2022-08-09 10:21:45 +01:00
Werner Lewis
3b09739c1b
Add test case for mbedtls_ecp_set_zero
...
Tests function with various ECP point conditions, covering freshly
initialized, zeroed, non-zero, and freed points.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-08 17:22:55 +01:00
Andrzej Kurek
9f42c0683c
Adjust hash dependencies in test_suite_ecdsa
...
Only deterministic tests require SHA256 now.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-08-08 07:31:48 -04:00
Gilles Peskine
5740ff5f1f
Merge pull request #5949 from Summer-ARM/mbedtls-psa-crypto-config
...
MBEDTLS_POLY1305_C and MBEDTLS_CHACHA20_C are needed when PSA_WANT_ALG_CHACHA20_POLY1305 is defined
2022-08-05 11:03:45 +02:00
Gilles Peskine
b4983d4556
Merge pull request #6164 from mprse/md_ssl_test
...
Avoid use of MD in SSL test suite
2022-08-05 11:02:44 +02:00
Gilles Peskine
f860f3742b
Merge pull request #6070 from wernerlewis/bignum_test_radix
...
Remove radix argument from bignum test functions
2022-08-05 11:01:07 +02:00
Gilles Peskine
57d4c11c44
Merge pull request #6165 from mprse/md_x509_test
...
Avoid use of MD in X.509 write test suite
2022-08-04 10:11:03 +02:00
Gilles Peskine
b3edc1576c
Merge pull request #2602 from edsiper/crt-symlink
...
x509_crt: handle properly broken links when looking for certificates
2022-08-03 13:05:29 +02:00
Gilles Peskine
07e7fe516b
Merge pull request #6088 from tuvshinzayaArm/validation_remove_change_curve
...
Validation remove and change in files related to curve in library
2022-08-03 13:05:16 +02:00
Gilles Peskine
7e1ee0f04b
Merge pull request #6114 from mman/development
...
Use double quotes to include private header file psa_crypto_cipher.h
2022-08-03 13:04:57 +02:00
Jerry Yu
27d80927d5
fix wrong typo
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-08-02 21:28:55 +08:00
Martin Man
4741e0b56c
Use double quotes to include private header file psa_crypto_cipher.h
...
Signed-off-by: Martin Man <mman@martinman.net>
Co-authored-by: Tom Cosgrove <81633263+tom-cosgrove-arm@users.noreply.github.com>
2022-08-02 12:44:35 +02:00
Aditya Patwardhan
3096f331ee
Fix missing prototype warning when MBEDTLS_DEPRECATED_REMOVED
is
...
enabled
Added the changelog.d entry
Signed-off-by: Aditya Patwardhan <aditya.patwardhan@espressif.com>
2022-08-02 11:15:18 +05:30
savent
5d8adab983
cmake: IAR support option( MBEDTLS_FATAL_WARNINGS)
...
IAR toolchain makes some warning, forcing 'warning as error' is not for sure.
Signed-off-by: savent <savent_gate@outlook.com>
2022-08-02 03:23:02 +00:00
Werner Lewis
dc47fe71df
Use upper case for bignum string comparison
...
Test data which is compared as a hex string now uses upper case to
match output of mbedtls_mpi_write_string() output. This removes usage
of strcasecmp().
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-01 15:17:45 +01:00
Werner Lewis
3ccc116c35
Apply test data changes for conflicting cases
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-01 15:17:45 +01:00
Werner Lewis
a453c14a12
Remove radix arguments from tests added in 3.2
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-01 15:07:14 +01:00
Werner Lewis
efda01fb8c
Fix formatting in bignum test functions
...
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-01 15:07:14 +01:00
Werner Lewis
f65a327111
Remove remaining bignum radix args
...
Functions which are not covered by script, changes made to use radix
16.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-01 15:07:14 +01:00
Werner Lewis
9802d36168
Remove radix arg from bignum tests
...
Cases where radix was explictly declared are removed in most cases,
replaced using script. bignum arguments are represented as hexadecimal
strings. This reduces clutter in test data and makes bit patterns
clearer.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-01 15:07:14 +01:00
Werner Lewis
19b4cd893c
Remove radix arg from mbedtls_test_read_mpi
...
All uses have radix argument removed, using script.
Signed-off-by: Werner Lewis <werner.lewis@arm.com>
2022-08-01 15:05:24 +01:00
Przemek Stekiel
54a544600f
test_suite_x509write: use psa_hash_compute() instead mbedtls_md()
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-08-01 16:03:17 +02:00
Przemek Stekiel
cc59c998d8
test_suite_ssl: make PSA build independent on MD module
...
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
2022-08-01 14:29:56 +02:00
Bence Szépkúti
78ddc3e8fc
Merge pull request #6159 from tom-cosgrove-arm/fix-typos-in-md-files
...
Fix typographical errors in .md files found by cspell
2022-08-01 10:06:28 +02:00
Jerry Yu
2fcb056ea9
Add requires_{any,all}_configs_enabled functions
...
- requires_any_configs_enabled
- requires_all_configs_enabled
- requires_any_configs_disabled
- requires_all_configs_disabled
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-07-31 12:23:39 +08:00
Jerry Yu
d2d4110e8e
Remove Teminated
message from stdout
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-07-31 12:23:39 +08:00
Dave Rodgman
919ff15ecf
Merge pull request #4686 from Kazuyuki-Kimura/patch_#2020
...
Fixed a bug that the little-endian Microblaze does not work when MBEDTLS_HAVE_ASM is defined
2022-07-29 17:08:11 +01:00
Tom Cosgrove
0b86ac1957
Fix typographical errors in .md files found by cspell
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2022-07-29 13:44:01 +01:00
Dave Rodgman
27036c9e28
Merge pull request #6142 from tom-cosgrove-arm/fix-comments-in-docs-and-comments
...
Fix a/an typos in doxygen and other comments
2022-07-29 12:59:05 +01:00
Zhangsen Wang
d5e8a482f9
delete whitespace in comment
...
Signed-off-by: Zhangsen Wang <zhangsen.wang@arm.com>
2022-07-29 07:53:36 +00:00
Zhangsen Wang
baeffbbdd2
skip test with openssl client because it will timeout with certain seed due to an openssl bug
...
Signed-off-by: Zhangsen Wang <zhangsen.wang@arm.com>
2022-07-29 06:35:26 +00:00
Jerry Yu
c3bf748dc7
fix vertical alignment
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-07-29 10:27:17 +08:00
Jerry Yu
09a99fcf8a
Add rsa_pss_rsae_* sig algos for tls12 default
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-07-28 23:08:00 +08:00
Jerry Yu
379b1ff3a5
remove useless comment
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-07-28 23:08:00 +08:00
Jerry Yu
95b743ca17
Rename get_pk_type_and_md_alg
...
The function is for both tls12 and tls13 now.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-07-28 23:08:00 +08:00
Jerry Yu
eec4f03c60
fix typo and changelog entry issues
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-07-28 23:08:00 +08:00
Jerry Yu
72a858517b
add changelog entry
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-07-28 23:08:00 +08:00
Jerry Yu
6455b687fe
add rsa_pss_rsae_* test for tls12 server
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-07-28 23:08:00 +08:00
Jerry Yu
693a47ab1d
add rsa_pss_rsae_* support in tls12
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-07-28 23:08:00 +08:00