mbedtls/tests
Andrzej Kurek 3fd9297658 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>
Signed-off-by: Piotr Nowicki <piotr.nowicki@arm.com>
2020-04-17 11:30:21 +02:00
..
.jenkins Add Jenkinsfile for PR job 2018-10-19 15:25:57 +01:00
configs Add a test component with malloc(0) returning NULL 2019-09-30 14:01:37 +02:00
data_files Guard from undefined behaviour in case of an INT_MAX max_pathlen 2020-04-17 11:30:21 +02:00
git-scripts Add doxygen.sh script to git hooks 2018-10-29 10:45:00 +02:00
scripts Add test for MBEDTLS_SSL_HW_RECORD_ACCEL in all.sh 2020-02-26 10:26:02 +01:00
suites Guard from undefined behaviour in case of an INT_MAX max_pathlen 2020-04-17 11:30:21 +02:00
.gitignore
CMakeLists.txt Add a facility to skip running some test suites 2018-12-14 18:50:34 +01:00
compat.sh Exclude DTLS 1.2 only with older OpenSSL 2019-08-13 11:44:30 +02:00
Descriptions.txt
Makefile Merge remote-tracking branch 'origin/pr/2320' into mbedtls-2.7 2019-06-21 15:55:21 +01:00
ssl-opt.sh Adjust timeout of tests with "no resend" assertions 2020-03-31 09:57:45 +02:00