remove WOLFSSL_TYPES, add defines in user settings

This commit is contained in:
Tesfa Mael
2018-11-16 18:24:20 -08:00
parent 11ccce809d
commit 061757c909
5 changed files with 25 additions and 20 deletions

View File

@@ -12,6 +12,8 @@
#define RX_BUF_SIZE 1024
#define TCP_SERVER_CONN_Q_SIZE 1
/* derived from wolfSSL/certs/server-ecc.der */
static const unsigned char server_ecc_der_256[] = { 0x30, 0x82, 0x03, 0x10,
0x30, 0x82, 0x02, 0xB5, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x09, 0x00,
0xEF, 0x46, 0xC7, 0xA4, 0x9B, 0xBB, 0x60, 0xD3, 0x30, 0x0A, 0x06, 0x08,
@@ -80,6 +82,8 @@ static const unsigned char server_ecc_der_256[] = { 0x30, 0x82, 0x03, 0x10,
0x25, 0x7D, 0xCA, 0x7A, 0x5D, 0xBA, 0xC4, 0xB2, 0xF6, 0x7D, 0x04, 0xC7,
0xBD, 0x62, 0xC9, 0x20 };
/* derived from wolfSSL/certs/ecc-key.der */
static const unsigned char ecc_key_der_256[] = { 0x30, 0x77, 0x02, 0x01, 0x01,
0x04, 0x20, 0x45, 0xB6, 0x69, 0x02, 0x73, 0x9C, 0x6C, 0x85, 0xA1, 0x38,
0x5B, 0x72, 0xE8, 0xE8, 0xC7, 0xAC, 0xC4, 0x03, 0x8D, 0x53, 0x35, 0x04,

View File

@@ -6,38 +6,45 @@
#endif
#define MICRIUM
#define WOLFSSL_MICRIUM_3_0
/*for test.h to include platform dependent socket related header files.*/
#define USE_WINDOWS_API
#define WOLFSSL_BENCHMARK_TEST
/*
#define WOLFSSL_MICRIUM_CRYPTO_TEST
#define WOLFSSL_MICRIUM_CLIENT_TEST
#define WOLFSSL_MICRIUM_SERVER_TEST
*/
#define SIZEOF_LONG_LONG 8
/* test.h includes platform dependent header files.
When using Windows simulator, you must define USE_WINDOWS_API */
#ifdef _WIN32
define USE_WINDOWS_API
#endif
#define NO_FILESYSTEM
#define SIZEOF_LONG_LONG 8
/* prevents from including multiple definition of main() */
#define NO_MAIN_DRIVER
#define NO_TESTSUITE_MAIN_DRIVER
// wolfSSL_dtls_get_current_timeout is called from MicriumReceiveFrom
/* wolfSSL_dtls_get_current_timeout is called from MicriumReceiveFrom */
#define WOLFSSL_DTLS
/* include certificate test buffers via header files */
/* includes certificate test buffers via header files */
#define USE_CERT_BUFFERS_2048
/*use kB instead of mB for embedded benchmarking*/
#define BENCH_EMBEDDED
#define NO_ECC_VECTOR_TEST
#define NO_WRITE_TEMP_FILES
// no pow, no math.h
/* no pow, no math.h */
#define WOLFSSL_DH_CONST
#define XSNPRINTF snprintf
//#define NO_ASN_TIME
#ifdef __cplusplus
} /* extern "C" */
#endif

View File

@@ -1517,6 +1517,9 @@ time_t micrium_time(time_t* timer)
Clk_GetTS_Unix(&sec);
if (timer != NULL)
*timer = sec;
return (time_t) sec;
}

View File

@@ -202,12 +202,10 @@
#ifdef MICRIUM
#if (BSP_SER_COMM_EN == DEF_ENABLED)
#include <bsp_ser.h>
void BSP_Ser_Printf (CPU_CHAR* format, ...);
#undef printf
#define printf BSP_Ser_Printf
#endif
#elif defined(WOLFSSL_PB)
#include <stdarg.h>
int wolfssl_pb_print(const char*, ...);

View File

@@ -1161,13 +1161,6 @@ extern void uITRON4_free(void *p) ;
#define CUSTOM_RAND_TYPE RAND_NBR
#define CUSTOM_RAND_GENERATE Math_Rand
#endif
#ifndef WOLFSSL_MICRIUM_3_0
#define WOLFSSL_TYPES
#endif
typedef CPU_INT08U byte;
typedef CPU_INT16U word16;
typedef CPU_INT32U word32;
#define STRING_USER
#define XSTRLEN(pstr) ((CPU_SIZE_T)Str_Len((CPU_CHAR *)(pstr)))
#define XSTRNCPY(pstr_dest, pstr_src, len_max) \