Gilles Peskine 53a7206269 Support negative zero as MPI test input
The bignum module does not officially support "negative zero" (an
mbedtls_mpi object with s=-1 and all limbs zero). However, we have a
history of bugs where a function that should produce an official
zero (with s=1), produces a negative zero in some circumstances. So it's
good to check that the bignum functions are robust when passed a negative
zero as input. And for that, we need a way to construct a negative zero
from test case arguments.

There are checks that functions don't produce negative zeros as output in
the test suite. Skip those checks if there's a negative zero input: we
don't want functions to _create_ negative zeros, but we don't mind if
they _propagate_ negative zeros.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-11-10 15:15:25 +01:00
..
.jenkins Add a Jenkinsfile for PR job testing 2018-10-19 16:41:54 +01:00
configs Add header guard around malloc(0) returning NULL implementation 2022-03-04 15:25:42 -05:00
data_files Merge pull request #6380 from Kabbah/backport2.28-x509-info-hwmodulename-hex 2022-11-08 17:11:09 +01:00
docker/bionic Remove accidental requirement on the worktree content 2021-12-02 13:19:19 +01:00
git-scripts Fix typographical errors in .md files found by cspell 2022-07-29 13:54:52 +01:00
include Support negative zero as MPI test input 2022-11-10 15:15:25 +01:00
scripts For binary operations, test both x op y and y op x 2022-11-10 15:15:25 +01:00
src Support negative zero as MPI test input 2022-11-10 15:15:25 +01:00
suites Support negative zero as MPI test input 2022-11-10 15:15:25 +01:00
.gitignore tests: Add build of a PSA test driver library 2021-11-30 14:49:19 +01:00
CMakeLists.txt CMake: generate the list of test suites automatically 2022-01-25 23:28:51 +01:00
compat-in-docker.sh Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
compat.sh Add comment in compat.sh about callers 2022-04-14 09:29:01 +02:00
context-info.sh Merge pull request #3614 from gilles-peskine-arm/ssl-opt-gnutls-printf-development 2020-11-04 17:55:42 +01:00
Descriptions.txt Revert "Remove tests that depend on TLS or X.509" 2020-03-19 14:17:54 +01:00
make-in-docker.sh Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
Makefile tests: Add build of a PSA test driver library 2021-11-30 14:49:19 +01:00
ssl-opt-in-docker.sh Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
ssl-opt.sh Add GCM dependency to "Per-version suites: TLS 1.2" 2022-10-06 12:15:21 +02:00