Fix the build without check_config.h (inclusion of limits.h)
Including `mbedtls/check_config.h` from `mbedtls/config.h` is optional. If
done, `limits.h` gets included. If not done, we were missing the inclusion
of `limits.h` in several source files. Fix this and add a test build that
doesn't include `mbedtls/check_config.h`.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/library/oid.c b/library/oid.c
index 7d7f1bf..2868ef9 100644
--- a/library/oid.c
+++ b/library/oid.c
@@ -15,6 +15,7 @@
#include "mbedtls/rsa.h"
#include "mbedtls/error.h"
+#include <limits.h>
#include <stdio.h>
#include <string.h>
diff --git a/library/psa_crypto_rsa.c b/library/psa_crypto_rsa.c
index cc3ceca..3c569b1 100644
--- a/library/psa_crypto_rsa.c
+++ b/library/psa_crypto_rsa.c
@@ -16,6 +16,7 @@
#include "psa_crypto_rsa.h"
#include "psa_crypto_hash.h"
+#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include "mbedtls/platform.h"
diff --git a/library/ssl_msg.c b/library/ssl_msg.c
index 5e85679..1613a1e 100644
--- a/library/ssl_msg.c
+++ b/library/ssl_msg.c
@@ -29,6 +29,7 @@
#include "constant_time_internal.h"
#include "mbedtls/constant_time.h"
+#include <limits.h>
#include <string.h>
#if defined(MBEDTLS_USE_PSA_CRYPTO)
diff --git a/library/x509_crt.c b/library/x509_crt.c
index a3a4525..6728fa0 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -26,6 +26,7 @@
#include "mbedtls/oid.h"
#include "mbedtls/platform_util.h"
+#include <limits.h>
#include <string.h>
#if defined(MBEDTLS_PEM_PARSE_C)