Fix threshold checks for MBEDTLS_X509_MAX_INTERMEDIATE_CA

This commit is contained in:
Simon Butcher 2017-07-28 12:15:13 +01:00
parent 85097c7c38
commit efdfeeba6a
2 changed files with 2 additions and 2 deletions

View file

@ -2106,7 +2106,7 @@ run_test "Authentication: client no cert, ssl3" \
# The "max_int chain" tests assume that MAX_INTERMEDIATE_CA is set to its # The "max_int chain" tests assume that MAX_INTERMEDIATE_CA is set to its
# default value (8) # default value (8)
: ${MAX_IM_CA:='20'} : ${MAX_IM_CA:='19'}
MAX_IM_CA_CONFIG=$( ../scripts/config.pl get MBEDTLS_X509_MAX_INTERMEDIATE_CA) 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" -gt "$MAX_IM_CA" ]; then

View file

@ -7,7 +7,7 @@
#include "mbedtls/oid.h" #include "mbedtls/oid.h"
#include "mbedtls/base64.h" #include "mbedtls/base64.h"
#if MBEDTLS_X509_MAX_INTERMEDIATE_CA >= 19 #if MBEDTLS_X509_MAX_INTERMEDIATE_CA > 19
#error "The value of MBEDTLS_X509_MAX_INTERMEDIATE_C is larger \ #error "The value of MBEDTLS_X509_MAX_INTERMEDIATE_C is larger \
than the current threshold 19. To test larger values, please \ than the current threshold 19. To test larger values, please \
adapt the script tests/data_files/dir-max/long.sh." adapt the script tests/data_files/dir-max/long.sh."