mbedtls/tests
Andrzej Kurek 1605074f97
Guard from undefined behaviour in case of an INT_MAX max_pathlen
When parsing a certificate with the basic constraints extension
the max_pathlen that was read from it was incremented regardless
of its value. However, if the max_pathlen is equal to INT_MAX (which
is highly unlikely), an undefined behaviour would occur.
This commit adds a check to ensure that such value is not accepted
as valid. Relevant tests for INT_MAX and INT_MAX-1 are also introduced.
Certificates added in this commit were generated using the
test_suite_x509write, function test_x509_crt_check. Input data taken 
from the "Certificate write check Server1 SHA1" test case, so the generated
files are like the "server1.crt", but with the "is_ca" field set to 1 and
max_pathlen as described by the file name.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2020-04-15 06:15:45 -04:00
..
.jenkins
configs Add a test component with malloc(0) returning NULL 2020-02-11 19:26:28 +01:00
data_files Guard from undefined behaviour in case of an INT_MAX max_pathlen 2020-04-15 06:15:45 -04:00
docker/bionic
git-scripts
scripts Merge 'mbedtls/development' into merge-crypto-unremoved-20200304 2020-03-23 18:02:07 +01:00
suites Guard from undefined behaviour in case of an INT_MAX max_pathlen 2020-04-15 06:15:45 -04:00
.gitignore PSA return status coverage script 2019-09-06 19:28:47 +02:00
CMakeLists.txt Merge mbed-crypto into mbedtls: the merge commit 2020-03-23 17:54:46 +01:00
compat-in-docker.sh
compat.sh Revert "Remove tests that depend on TLS or X.509" 2020-03-19 14:17:54 +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
Makefile Revert "tests: Use parent module includes when used as a submodule" 2020-03-19 14:13:59 +01:00
psa_crypto_helpers.h PSA return status coverage script 2019-09-06 19:28:47 +02:00
psa_helpers.h
ssl-opt-in-docker.sh
ssl-opt.sh Improve pointer calculations when resizing I/O buffers 2020-04-09 04:33:00 -04:00