From b21bf90e1b16c42f52da61b60b6fac4cd73a29fd Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Thu, 1 Nov 2012 17:08:07 -0600 Subject: [PATCH] update CTaoCrypt test for MQX example --- ctaocrypt/test/test.c | 44 ++++++++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/ctaocrypt/test/test.c b/ctaocrypt/test/test.c index 347164d53..bcb54b677 100644 --- a/ctaocrypt/test/test.c +++ b/ctaocrypt/test/test.c @@ -23,10 +23,6 @@ #include #endif -#include -#include -#include - #ifdef CYASSL_TEST_CERT #include #else @@ -71,6 +67,15 @@ #include "crypto_ntru.h" #endif +#include +#ifdef FREESCALE_MQX + #include + #include +#else + #include +#endif +#include + #ifdef THREADX /* since just testing, use THREADX log printf instead */ @@ -1398,11 +1403,20 @@ byte GetEntropy(ENTROPY_CMD cmd, byte* out) #ifndef NO_RSA -static const char* clientKey = "./certs/client-key.der"; -static const char* clientCert = "./certs/client-cert.der"; -#ifdef CYASSL_CERT_GEN - static const char* caKeyFile = "./certs/ca-key.der"; - static const char* caCertFile = "./certs/ca-cert.pem"; +#ifdef FREESCALE_MQX + static const char* clientKey = "a:\certs\\client-key.der"; + static const char* clientCert = "a:\certs\\client-cert.der"; + #ifdef CYASSL_CERT_GEN + static const char* caKeyFile = "a:\certs\\ca-key.der"; + static const char* caCertFile = "a:\certs\\ca-cert.pem"; + #endif + #else + static const char* clientKey = "./certs/client-key.der"; + static const char* clientCert = "./certs/client-cert.der"; + #ifdef CYASSL_CERT_GEN + static const char* caKeyFile = "./certs/ca-key.der"; + static const char* caCertFile = "./certs/ca-cert.pem"; + #endif #endif #define FOURK_BUF 4096 @@ -1813,7 +1827,11 @@ int rsa_test(void) #ifndef NO_DH -static const char* dhKey = "./certs/dh2048.der"; +#ifdef FREESCALE_MQX + static const char* dhKey = "a:\certs\\dh2048.der"; +#else + static const char* dhKey = "./certs/dh2048.der"; +#endif int dh_test(void) { @@ -1877,7 +1895,11 @@ int dh_test(void) #ifndef NO_DSA -static const char* dsaKey = "./certs/dsa2048.der"; +#ifdef FREESCALE_MQX + static const char* dsaKey = "a:\certs\\dsa2048.der"; +#else + static const char* dsaKey = "./certs/dsa2048.der"; +#endif int dsa_test(void) {