Fix tests to work in Mbed OS test environment
Update x509parse and x509write test suites to include "x509.c" from correct location.
This commit is contained in:
parent
e2bf54d3d1
commit
4ecfbd3b16
3 changed files with 9 additions and 0 deletions
|
@ -16,6 +16,7 @@ else
|
||||||
LIBRARY_DIR=../src
|
LIBRARY_DIR=../src
|
||||||
INCLUDE_DIR=-I../inc
|
INCLUDE_DIR=-I../inc
|
||||||
CFLAGS += "-DMBEDTLS_CONFIG_FILE=\"mbedtls/test_config.h\""
|
CFLAGS += "-DMBEDTLS_CONFIG_FILE=\"mbedtls/test_config.h\""
|
||||||
|
CFLAGS += "-DTEST_ENV_MBED_OS"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LOCAL_CFLAGS = $(WARNING_CFLAGS) $(INCLUDE_DIR) -D_FILE_OFFSET_BITS=64
|
LOCAL_CFLAGS = $(WARNING_CFLAGS) $(INCLUDE_DIR) -D_FILE_OFFSET_BITS=64
|
||||||
|
|
|
@ -12,7 +12,11 @@
|
||||||
/* We need to include x509.c because we are testing x509 internal
|
/* We need to include x509.c because we are testing x509 internal
|
||||||
* functions from x509_internal.h which are static. With this include
|
* functions from x509_internal.h which are static. With this include
|
||||||
* we get the tested functions defined. */
|
* we get the tested functions defined. */
|
||||||
|
#if defined(TEST_ENV_MBED_OS)
|
||||||
|
#include "../src/x509.c"
|
||||||
|
#else
|
||||||
#include "../library/x509.c"
|
#include "../library/x509.c"
|
||||||
|
#endif
|
||||||
|
|
||||||
#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 \
|
||||||
|
|
|
@ -9,7 +9,11 @@
|
||||||
/* We need to include x509.c because we are testing x509 internal
|
/* We need to include x509.c because we are testing x509 internal
|
||||||
* functions from x509_internal.h which are static. With this include
|
* functions from x509_internal.h which are static. With this include
|
||||||
* we get the tested functions defined. */
|
* we get the tested functions defined. */
|
||||||
|
#if defined(TEST_ENV_MBED_OS)
|
||||||
|
#include "../src/x509.c"
|
||||||
|
#else
|
||||||
#include "../library/x509.c"
|
#include "../library/x509.c"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_RSA_C)
|
#if defined(MBEDTLS_RSA_C)
|
||||||
int mbedtls_rsa_decrypt_func( void *ctx, int mode, size_t *olen,
|
int mbedtls_rsa_decrypt_func( void *ctx, int mode, size_t *olen,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue