mirror of
https://github.com/yuzu-emu/mbedtls
synced 2024-11-24 20:28:10 +00:00
Fix the check for max CA intermediates in ssl-opt.sh
The tests only work for a specific number for MBEDTLS_X509_MAX_INTERMEDIATE_CA so the check has been changed to confirm the default value, and to show an error otherwise.
This commit is contained in:
parent
9e24b5184c
commit
f145a9dac2
1 changed files with 5 additions and 10 deletions
|
@ -2106,22 +2106,17 @@ run_test "Authentication: client no cert, ssl3" \
|
|||
# The "max_int chain" tests assume that MAX_INTERMEDIATE_CA is set to its
|
||||
# default value (8)
|
||||
|
||||
: ${MAX_IM_CA:='19'}
|
||||
MAX_IM_CA='8'
|
||||
MAX_IM_CA_CONFIG=$( ../scripts/config.pl get MBEDTLS_X509_MAX_INTERMEDIATE_CA)
|
||||
|
||||
if [ -n "$MAX_IM_CA_CONFIG" ] && [ "$MAX_IM_CA_CONFIG" -gt "$MAX_IM_CA" ]; then
|
||||
if [ -n "$MAX_IM_CA_CONFIG" ] && [ "$MAX_IM_CA_CONFIG" -ne "$MAX_IM_CA" ]; then
|
||||
printf "The ${CONFIG_H} file contains a value for the configuration of\n"
|
||||
printf "MBEDTLS_X509_MAX_INTERMEDIATE_CA that is greater than the script’s\n"
|
||||
printf "MBEDTLS_X509_MAX_INTERMEDIATE_CA that is different from the script’s\n"
|
||||
printf "test value of ${MAX_IM_CA}. \n"
|
||||
printf "\n"
|
||||
printf "By default, this value cannot be higher as there are insufficient\n"
|
||||
printf "test certificate files available to test with.\n"
|
||||
printf "The tests assume this value and if it changes, the tests in this\n"
|
||||
printf "script should also be adjusted.\n"
|
||||
printf "\n"
|
||||
printf "To generate additional test certificates use the script:\n"
|
||||
printf " tests/data_files/dir-maxpath/long.sh\n"
|
||||
printf "\n"
|
||||
printf "To test using an alternative value, please set the environment variable\n"
|
||||
printf "MAX_IM_CA or change the default value in the script tests/ssl-opt.sh.\n"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue