Dave Rodgman
f58172fe43
Merge remote-tracking branch 'origin/development' into pr3431
2022-11-10 09:54:49 +00:00
Gilles Peskine
9a571ddfd9
Merge pull request #6543 from mpg/improve-test-suites-listing
...
Improve test suite detection in run-test-suites.pl
2022-11-09 19:03:03 +01:00
Gilles Peskine
ed4b34aa7c
Merge pull request #6570 from gilles-peskine-arm/bignum-mbedtls_test_read_mpi_core-nonempty
...
Forbid empty mpi_core in test data
2022-11-09 19:02:24 +01:00
Nick Child
89e82e1685
pkcs7: Add dependecy on MBEDTLS_MD_C
...
Signed-off-by: Nick Child <nick.child@ibm.com>
2022-11-09 10:36:10 -06:00
Manuel Pégourié-Gonnard
b9581824f7
Merge pull request #6561 from AndrzejKurek/ecjpake-error-injection
...
Improve error injection in EC J-PAKE tests
2022-11-09 11:48:36 +01:00
Gilles Peskine
95b5addcd6
Don't test mbedtls_mpi_core_lt_ct with 0 limbs
...
A core MPI must have at least 1 limb. We can no longer test with 0 limbs,
and we don't need to anyway, so don't try.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-09 11:18:38 +01:00
Gilles Peskine
0b7e07904e
Forbid empty mpi_core in test data
...
This way static analyzers have a chance of knowing we don't expect the
bignum functions to support empty inputs. As things are, Coverity keeps
complaining about it.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-09 10:45:15 +01:00
Gilles Peskine
dae43401e1
Merge pull request #6568 from mfischer/development
...
include: mbedtls: Add missing private_access header
2022-11-09 10:18:50 +01:00
Moritz Fischer
ab45425623
include: mbedtls: Add missing private_access header
...
This adds a missing private access header.
Signed-off-by: Moritz Fischer <moritzf@google.com>
2022-11-08 14:55:32 -08:00
Gilles Peskine
69ae1ee4fe
Merge pull request #6552 from gstrauss/bignum-aliasing
...
Add comments for some forbidden aliasing in bignum.h interfaces
2022-11-08 17:15:37 +01:00
Gilles Peskine
d4bd38ba5d
Merge pull request #6544 from KloolK/development
...
Fix outdated reference in debug message
2022-11-08 17:12:20 +01:00
Gilles Peskine
4a480ac5a1
Merge pull request #6265 from Kabbah/x509-info-hwmodulename-hex
...
`x509_info_subject_alt_name`: Render HardwareModuleName as hex
2022-11-08 17:11:07 +01:00
Andrzej Kurek
c018204019
Improve error injection in EC J-PAKE tests
...
Instead of corrupting the public key part of the message,
corrupt the proof part. A proof is conceptually similar to a signature,
and changing anything in it should make it invalid with
a high probability.
Also, instead of shifting data, perform a bitflip.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-11-08 08:12:56 -05:00
Gilles Peskine
42d75f2daf
Merge pull request #6013 from gstrauss/asn1-type-free
...
Shared code to free x509 structs like mbedtls_x509_named_data
2022-11-08 12:20:20 +01:00
Gilles Peskine
433f1f1809
Merge pull request #6456 from gabor-mezei-arm/6237_test_update_cond_assign_swap
...
Update tests to use conditional assign and swap
2022-11-08 12:15:07 +01:00
Dave Rodgman
ae2635df6f
Merge pull request #6306 from tom-cosgrove-arm/issue-6305-fix
...
Return an error from mbedtls_ssl_handshake_step() if neither client nor server
2022-11-08 10:54:17 +00:00
Glenn Strauss
0750d08601
Add comments for some forbidden aliasing in bignum
...
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
2022-11-08 02:47:21 -05:00
Glenn Strauss
2a64299648
Update tests/suites/test_suite_asn1parse.function
...
Co-authored-by: Andrzej Kurek <andrzej.kurek@arm.com>
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
2022-11-07 20:09:38 -05:00
Glenn Strauss
aa36c2a6f6
Update tests/suites/test_suite_asn1parse.function
...
Co-authored-by: Andrzej Kurek <andrzej.kurek@arm.com>
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
2022-11-07 20:08:54 -05:00
Glenn Strauss
82ba274c01
Deprecate mbedtls_asn1_free_named_data()
...
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
2022-11-07 15:42:44 -05:00
Gilles Peskine
faefe62013
Merge pull request #6390 from mpg/fix-ecjpake-psa-format
...
Fix ecjpake PSA format
2022-11-07 17:35:44 +01:00
Gilles Peskine
bf249accc7
Merge pull request #6498 from yuhaoth/pr/fix-session-resumption-fail-when-hostname-is-not-localhost
...
BUG: Fix session resumption fail when hostname is not localhost
2022-11-07 17:33:38 +01:00
Jan Bruckner
f869bfdfef
Fix outdated reference in debug message
...
Signed-off-by: Jan Bruckner <jan@janbruckner.de>
2022-11-07 15:28:49 +01:00
Gilles Peskine
34c09469f3
Merge pull request #5396 from SiliconLabs/codegen_1.1
...
Driver dispatch Codegen 1.1
2022-11-07 15:27:41 +01:00
Gabor Mezei
a8cf998bc9
Let the allocated memory visible for the memory sanitizer
...
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2022-11-07 15:14:49 +01:00
Gabor Mezei
7ba7b3aded
Update tests to use mbedtls_test_read_mpi_core
...
In conditional assign and swap tests use the mbedtls_test_read_mpi_core
function for reading MPIs.
Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
2022-11-07 15:14:49 +01:00
Manuel Pégourié-Gonnard
38860e2f19
Improve test suite detection in run-test-suites.pl
...
Looking for executables causes problems with leftover compiled test
suites from other branches when we forget to run make clean before
switching branches. Using the .data files is more robust as most of them
are tracked, so will be removed when switching branches.
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
2022-11-07 10:05:49 +01:00
Dave Rodgman
2364aaefa6
Update tests/suites/test_suite_pkcs7.function
...
Address test dependency issue
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2022-11-04 11:33:04 +00:00
Janos Follath
49e9fbd6bc
Merge pull request #6532 from yanesca/bignum_common_merge_slots
...
Add merge slots to bignum_common.py
2022-11-04 08:37:07 +00:00
Janos Follath
f8b3b72910
Add merge slots to bignum_common.py
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-03 14:46:18 +00:00
Nick Child
fc234b7b52
test/pkcs7: Add Windows CRLF EOF to data files
...
Windows tests are failing pkcs7 verification due to differnt line
endings. Therefore, add make instuctions for building the data
files with Windows EOF instead. As a result, regenerate other data
files so that verification works.
Add these CRLF EOF files to the exception in check_files to ignore
the line endings.
Signed-off-by: Nick Child <nick.child@ibm.com>
2022-11-03 09:24:20 -05:00
Janos Follath
4feb94a965
Merge pull request #6530 from yanesca/bignum_merge_scaffolding
...
Bignum merge scaffolding
2022-11-03 11:29:32 +00:00
Asfandyar Orakzai
9b656d3c80
removed stray whitespaces from change logs
...
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-11-03 11:39:36 +01:00
Asfandyar Orakzai
65cd8a4a23
fixed formating issues in psa_crypto_code_gen_1_1.txt
...
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-11-03 11:16:40 +01:00
Asfandyar Orakzai
4f63ac4358
fixed changelog formating
...
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-11-03 10:18:05 +01:00
Janos Follath
d820ca5d07
Fix bignum test generator class names
...
Co-authored-by: minosgalanakis <30719586+minosgalanakis@users.noreply.github.com>
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-03 08:42:54 +00:00
Asfandyar Orakzai
ee2b637d03
Fixed change log issue
...
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-11-02 21:50:27 +01:00
Janos Follath
c1a81bc998
Remove trailing new lines
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-02 17:33:11 +00:00
Janos Follath
9cf14cd6b0
Make pylint happy
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-02 17:28:39 +00:00
Janos Follath
6642cafae3
Fix merge separator position
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-02 17:28:39 +00:00
Janos Follath
be13652296
Use comments for merge separators in .data files
...
We do have a comment syntax for .data files, there is no need for dummy
test cases.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-02 17:28:37 +00:00
Janos Follath
1be322a795
Add merge slots to raw and mod_raw test generation
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-02 17:27:36 +00:00
Janos Follath
b99b056f0a
Add script for generating mod test cases
...
This commit only adds the boilerplate, no actual tests are added.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-02 17:27:36 +00:00
Janos Follath
df8239b846
Add script for generating mod_raw test cases
...
This commit only adds the boilerplate, no actual tests are added.
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-02 17:27:36 +00:00
Janos Follath
5933f691a2
Add merge slots to Bignum files
...
Legacy Bignum is excluded as it doesn't get regular extensions like new
ones.
Each slot uses comments of their respective filetype. Since .data files
don't have a syntax for comments, dummy test cases are used. (These test
cases will never be executed and no noise will be added to tests.)
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-02 17:27:25 +00:00
Janos Follath
2a8bcf8c6f
Add bignum merge scaffolding
...
Signed-off-by: Janos Follath <janos.follath@arm.com>
2022-11-02 17:25:48 +00:00
Janos Follath
7b96f52b39
Merge pull request #6450 from gilles-peskine-arm/bignum-core-fill_random
...
Bignum core: fill_random
2022-11-02 17:23:31 +00:00
Asfandyar Orakzai
9bd28dc1e1
Update changed log
...
Signed-off-by: Asfandyar Orakzai <asfandyar.orakzai@silabs.com>
2022-11-02 16:36:14 +01:00
Gilles Peskine
22cdd0ccd3
Update some internal comments
...
The refactoring of fill_random had left some obsolete bits in comments.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-02 16:00:01 +01:00
Gilles Peskine
dd54324765
Increase iterations for some statistical tests
...
I ran into a sequence where the assertion `stats[8] > 0` failed for the
range 1..272 with 100 iterations.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-02 16:00:01 +01:00