mbedtls/tests
Andrzej Kurek acf7f2ce93 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:29:20 +02:00
..
.jenkins Add Jenkinsfile for PR job 2018-10-19 15:25:10 +01:00
configs Add a test component with malloc(0) returning NULL 2019-09-30 13:58:12 +02:00
data_files Guard from undefined behaviour in case of an INT_MAX max_pathlen 2020-04-17 11:29:20 +02:00
git-scripts Add doxygen.sh script to git hooks 2018-06-27 17:41:00 +03:00
scripts Change the use of pylint to optionally use pylint3 2020-03-16 13:53:06 +00:00
suites Guard from undefined behaviour in case of an INT_MAX max_pathlen 2020-04-17 11:29:20 +02:00
.gitignore
CMakeLists.txt Merge remote-tracking branch 'origin/pr/2293' into mbedtls-2.16 2019-03-05 16:31:02 +00:00
compat.sh Exclude DTLS 1.2 only with older OpenSSL 2019-08-13 11:44:04 +02:00
Descriptions.txt
Makefile Merge remote-tracking branch 'origin/pr/2053' into mbedtls-2.16 2019-06-21 15:59:16 +01:00
ssl-opt.sh Adjust timeout of tests with "no resend" assertions 2020-03-31 09:37:31 +02:00