forked from wolfSSL/wolfssl
CTaoCrypt test mods for MQX
This commit is contained in:
@ -99,6 +99,7 @@
|
|||||||
#ifdef FREESCALE_MQX
|
#ifdef FREESCALE_MQX
|
||||||
#include <mqx.h>
|
#include <mqx.h>
|
||||||
#include <fio.h>
|
#include <fio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#else
|
#else
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
@ -2376,30 +2377,32 @@ byte GetEntropy(ENTROPY_CMD cmd, byte* out)
|
|||||||
|
|
||||||
#ifndef NO_RSA
|
#ifndef NO_RSA
|
||||||
|
|
||||||
#ifdef FREESCALE_MQX
|
#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048)
|
||||||
static const char* clientKey = "a:\\certs\\client-key.der";
|
#ifdef FREESCALE_MQX
|
||||||
static const char* clientCert = "a:\\certs\\client-cert.der";
|
static const char* clientKey = "a:\\certs\\client-key.der";
|
||||||
#ifdef CYASSL_CERT_GEN
|
static const char* clientCert = "a:\\certs\\client-cert.der";
|
||||||
static const char* caKeyFile = "a:\\certs\\ca-key.der";
|
#ifdef CYASSL_CERT_GEN
|
||||||
static const char* caCertFile = "a:\\certs\\ca-cert.pem";
|
static const char* caKeyFile = "a:\\certs\\ca-key.der";
|
||||||
#endif
|
static const char* caCertFile = "a:\\certs\\ca-cert.pem";
|
||||||
#elif !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048) && defined(CYASSL_MKD_SHELL)
|
#endif
|
||||||
static char* clientKey = "certs/client-key.der";
|
#elif defined(CYASSL_MKD_SHELL)
|
||||||
static char* clientCert = "certs/client-cert.der";
|
static char* clientKey = "certs/client-key.der";
|
||||||
void set_clientKey(char *key) { clientKey = key ; } /* set by shell command */
|
static char* clientCert = "certs/client-cert.der";
|
||||||
void set_clientCert(char *cert) { clientCert = cert ; } /* set by shell command */
|
void set_clientKey(char *key) { clientKey = key ; } /* set by shell command */
|
||||||
#ifdef CYASSL_CERT_GEN
|
void set_clientCert(char *cert) { clientCert = cert ; } /* set by shell command */
|
||||||
static char* caKeyFile = "certs/ca-key.der";
|
#ifdef CYASSL_CERT_GEN
|
||||||
static char* caCertFile = "certs/ca-cert.pem";
|
static char* caKeyFile = "certs/ca-key.der";
|
||||||
void set_caKeyFile (char * key) { caKeyFile = key ; } /* set by shell command */
|
static char* caCertFile = "certs/ca-cert.pem";
|
||||||
void set_caCertFile(char * cert) { caCertFile = cert ; } /* set by shell command */
|
void set_caKeyFile (char * key) { caKeyFile = key ; } /* set by shell command */
|
||||||
#endif
|
void set_caCertFile(char * cert) { caCertFile = cert ; } /* set by shell command */
|
||||||
#elif !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048)
|
#endif
|
||||||
static const char* clientKey = "./certs/client-key.der";
|
#else
|
||||||
static const char* clientCert = "./certs/client-cert.der";
|
static const char* clientKey = "./certs/client-key.der";
|
||||||
#ifdef CYASSL_CERT_GEN
|
static const char* clientCert = "./certs/client-cert.der";
|
||||||
static const char* caKeyFile = "./certs/ca-key.der";
|
#ifdef CYASSL_CERT_GEN
|
||||||
static const char* caCertFile = "./certs/ca-cert.pem";
|
static const char* caKeyFile = "./certs/ca-key.der";
|
||||||
|
static const char* caCertFile = "./certs/ca-cert.pem";
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2848,10 +2851,12 @@ int rsa_test(void)
|
|||||||
|
|
||||||
#ifndef NO_DH
|
#ifndef NO_DH
|
||||||
|
|
||||||
#ifdef FREESCALE_MQX
|
#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048)
|
||||||
static const char* dhKey = "a:\certs\\dh2048.der";
|
#ifdef FREESCALE_MQX
|
||||||
#elif !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048)
|
static const char* dhKey = "a:\certs\\dh2048.der";
|
||||||
static const char* dhKey = "./certs/dh2048.der";
|
#else
|
||||||
|
static const char* dhKey = "./certs/dh2048.der";
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int dh_test(void)
|
int dh_test(void)
|
||||||
@ -2926,10 +2931,12 @@ int dh_test(void)
|
|||||||
|
|
||||||
#ifndef NO_DSA
|
#ifndef NO_DSA
|
||||||
|
|
||||||
#ifdef FREESCALE_MQX
|
#if !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048)
|
||||||
static const char* dsaKey = "a:\\certs\\dsa2048.der";
|
#ifdef FREESCALE_MQX
|
||||||
#elif !defined(USE_CERT_BUFFERS_1024) && !defined(USE_CERT_BUFFERS_2048)
|
static const char* dsaKey = "a:\\certs\\dsa2048.der";
|
||||||
static const char* dsaKey = "./certs/dsa2048.der";
|
#else
|
||||||
|
static const char* dsaKey = "./certs/dsa2048.der";
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int dsa_test(void)
|
int dsa_test(void)
|
||||||
|
@ -292,6 +292,8 @@
|
|||||||
#define USE_FAST_MATH
|
#define USE_FAST_MATH
|
||||||
#define TFM_TIMING_RESISTANT
|
#define TFM_TIMING_RESISTANT
|
||||||
#define FREESCALE_K70_RNGA
|
#define FREESCALE_K70_RNGA
|
||||||
|
/* #define FREESCALE_K53_RNGB */
|
||||||
|
#include "mqx.h"
|
||||||
#ifndef NO_FILESYSTEM
|
#ifndef NO_FILESYSTEM
|
||||||
#include "mfs.h"
|
#include "mfs.h"
|
||||||
#include "fio.h"
|
#include "fio.h"
|
||||||
|
Reference in New Issue
Block a user