mirror of https://github.com/wolfSSL/wolfssl
updated MDK5 projects for 3.9.0. Eliminated files for older versions
This commit is contained in:
parent
504081e602
commit
217ccd8b6a
|
@ -20,14 +20,13 @@
|
|||
*/
|
||||
|
||||
|
||||
|
||||
// <<< Use Configuration Wizard in Context Menu >>>
|
||||
|
||||
// <h> wolfCrypt Configuration
|
||||
|
||||
// <h>Cert/Key Strage
|
||||
// <o>Cert Storage <0=> SD Card <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes)
|
||||
#define MDK_CONF_CERT_BUFF 2
|
||||
#define MDK_CONF_CERT_BUFF 0
|
||||
#if MDK_CONF_CERT_BUFF== 1
|
||||
#define USE_CERT_BUFFERS_1024
|
||||
#elif MDK_CONF_CERT_BUFF == 2
|
||||
|
@ -147,8 +146,9 @@
|
|||
|
||||
// <e>POLY1305
|
||||
#define MDK_CONF_POLY1305 1
|
||||
#if MDK_CONF_POLY1305 == 0
|
||||
#if MDK_CONF_POLY1305 == 1
|
||||
#define HAVE_POLY1305
|
||||
#define HAVE_ONE_TIME_AUTH
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
#define NO_WRITEV
|
||||
#define NO_MAIN_DRIVER
|
||||
#define WOLFSSL_MDK_SHELL
|
||||
|
||||
/* #define SINGLE_THREADED or define RTOS option */
|
||||
#define WOLFSSL_CMSIS_RTOS
|
||||
|
@ -20,15 +17,13 @@
|
|||
#define USE_WOLFSSL_MEMORY
|
||||
#define WOLFSSL_MALLOC_CHECK
|
||||
|
||||
#define USER_TIME
|
||||
#define TIME_OVERRIDES
|
||||
#define XTIME time_dummy /* Have to be replaced with operational function */
|
||||
static long time_dummy(long *t) { return (365*24*60*60*(2016-1970)) ; }
|
||||
#define WOLFSSL_USER_CURRTIME
|
||||
#define XVALIDATEDATE(d, f,t) (0)
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#define NO_WRITEV
|
||||
#define NO_MAIN_DRIVER
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
/* wolfssl_KEIL_ARM.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
/******************************************************************************/
|
||||
/** This file is for defining types, values for specific to KEIL-MDK-ARM. **/
|
||||
/******************************************************************************/
|
||||
#ifndef WOLFSSL_KEIL_ARM_H
|
||||
#define WOLFSSL_KEIL_ARM_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Go to STDIN */
|
||||
#define fgets(buff, sz, fd) wolfssl_fgets(buff, sz, fd)
|
||||
extern char * wolfssl_fgets ( char * str, int num, FILE * f ) ;
|
||||
|
||||
#define SOCKET_T int
|
||||
|
||||
/*** #include <socket.h> ***/
|
||||
#define NUMBITSPERBYTE 8
|
||||
#define FD_SETSIZE 10
|
||||
|
||||
typedef long fd_mask;
|
||||
#define NFDBITS (sizeof(fd_mask) * NUMBITSPERBYTE) /* bits per mask */
|
||||
|
||||
typedef struct fd_set {
|
||||
fd_mask fds_bits[(FD_SETSIZE + NFDBITS - 1) / NFDBITS];
|
||||
} fd_set;
|
||||
|
||||
/*** #include <sys/types.h> ***/
|
||||
struct timeval {
|
||||
long tv_sec; /* seconds */
|
||||
long tv_usec; /* microseconds */
|
||||
};
|
||||
|
||||
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
|
||||
#define SCK_EWOULDBLOCK BSD_ERROR_WOULDBLOCK
|
||||
#define SCK_ETIMEOUT BSD_ERROR_TIMEOUT
|
||||
#include "rl_net.h"
|
||||
|
||||
typedef int socklen_t ;
|
||||
|
||||
/* for avoiding conflict with KEIL-TCPnet BSD socket */
|
||||
/* Bodies are in cyassl_KEIL_RL.c */
|
||||
#if defined(HAVE_KEIL_RTX)
|
||||
#define sleep(t) os_dly_wait(t/1000+1) ;
|
||||
#elif defined (WOLFSSL_CMSIS_RTOS)
|
||||
#define sleep(t) osDelay(t/1000+1) ;
|
||||
#endif
|
||||
|
||||
/* for avoiding conflicting with KEIL-TCPnet TCP socket */
|
||||
/* Bodies are in test.h */
|
||||
#define tcp_connect wolfssl_tcp_connect
|
||||
#define tcp_socket wolfssl_tcp_soket
|
||||
#define tcp_listen wolfssl_tcp_listen
|
||||
#define tcp_select(a,b) (0)
|
||||
|
||||
/** KEIL-RL TCPnet ****/
|
||||
/* TCPnet BSD socket does not have following functions. */
|
||||
extern char *inet_ntoa(struct in_addr in);
|
||||
extern unsigned long inet_addr(const char *cp);
|
||||
extern int select(int nfds, fd_set *readfds, fd_set *writefds,
|
||||
fd_set *exceptfds, const struct timeval *timeout);
|
||||
|
||||
#endif /* WOLFSSL_KEIL_TCP_NET */
|
||||
|
||||
#endif /* WOLFSSL_KEIL_ARM_H */
|
|
@ -426,12 +426,12 @@
|
|||
<File>
|
||||
<FileName>config-Crypt.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>.\RTE\wolfSSL\config-Crypt.h</FilePath>
|
||||
<FilePath>.\RTE\wolfssl\config-Crypt.h</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>user_settings.h</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>.\RTE\wolfSSL\user_settings.h</FilePath>
|
||||
<FilePath>.\RTE\wolfssl\user_settings.h</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
|
@ -468,6 +468,36 @@
|
|||
</Targets>
|
||||
|
||||
<RTE>
|
||||
<packages>
|
||||
<filter>
|
||||
<targetInfos/>
|
||||
</filter>
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptBenchmark"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptBenchmark"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta">
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptBenchmark"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptBenchmark"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptBenchmark"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
</packages>
|
||||
<apis>
|
||||
<api Capiversion="2.02" Cclass="CMSIS Driver" Cgroup="MCI" exclusive="0">
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0"/>
|
||||
|
@ -585,20 +615,20 @@
|
|||
<targetInfo name="CryptBenchmark"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Benchmark" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Benchmark" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptBenchmark"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptBenchmark"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Dummy" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Dummy" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptBenchmark"/>
|
||||
</targetInfos>
|
||||
|
@ -733,54 +763,54 @@
|
|||
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-Crypt.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-Crypt.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-Crypt.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-FS.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-FS.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-FS.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-RTX-TCP-FS.h</instance>
|
||||
<component Cclass="Other" Cgroup="CyaSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="2.7.0" condition="CyaSSL-RTX,TCP,FS"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\Other\config.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-Crypt.h">
|
||||
<instance index="0">RTE\wolfSSL\config-Crypt.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.3"/>
|
||||
<instance index="0">RTE\wolfssl\config-Crypt.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptBenchmark"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core"/>
|
||||
<package license="cyassl\IDE\MDK5-ARM\Docs\CyaSSL-Licnese.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.0.0"/>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\wolfssl\config.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\CyaSSL-Licnese.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\wolfssl\wolfcrypt\settings.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.4.6"/>
|
||||
<instance index="0" removed="1">RTE\wolfssl\settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\user_settings.h">
|
||||
<instance index="0">RTE\wolfSSL\user_settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.3"/>
|
||||
<instance index="0">RTE\wolfssl\user_settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptBenchmark"/>
|
||||
</targetInfos>
|
||||
|
|
|
@ -1,668 +0,0 @@
|
|||
/* settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
/* Place OS specific preprocessor flags, defines, includes here, will be
|
||||
included into every file because types.h includes it */
|
||||
|
||||
|
||||
#ifndef CTAO_CRYPT_SETTINGS_H
|
||||
#define CTAO_CRYPT_SETTINGS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Uncomment next line if using IPHONE */
|
||||
/* #define IPHONE */
|
||||
|
||||
/* Uncomment next line if using ThreadX */
|
||||
/* #define THREADX */
|
||||
|
||||
/* Uncomment next line if using Micrium ucOS */
|
||||
/* #define MICRIUM */
|
||||
|
||||
/* Uncomment next line if using Mbed */
|
||||
/* #define MBED */
|
||||
|
||||
/* Uncomment next line if using Microchip PIC32 ethernet starter kit */
|
||||
/* #define MICROCHIP_PIC32 */
|
||||
|
||||
/* Uncomment next line if using Microchip TCP/IP stack, version 5 */
|
||||
/* #define MICROCHIP_TCPIP_V5 */
|
||||
|
||||
/* Uncomment next line if using Microchip TCP/IP stack, version 6 or later */
|
||||
/* #define MICROCHIP_TCPIP */
|
||||
|
||||
/* Uncomment next line if using PIC32MZ Crypto Engine */
|
||||
/* #define CYASSL_MICROCHIP_PIC32MZ */
|
||||
|
||||
/* Uncomment next line if using FreeRTOS */
|
||||
/* #define FREERTOS */
|
||||
|
||||
/* Uncomment next line if using FreeRTOS Windows Simulator */
|
||||
/* #define FREERTOS_WINSIM */
|
||||
|
||||
/* Uncomment next line if using RTIP */
|
||||
/* #define EBSNET */
|
||||
|
||||
/* Uncomment next line if using lwip */
|
||||
/* #define CYASSL_LWIP */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for a game console */
|
||||
/* #define CYASSL_GAME_BUILD */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for LSR */
|
||||
/* #define CYASSL_LSR */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for Freescale MQX/RTCS/MFS */
|
||||
/* #define FREESCALE_MQX */
|
||||
|
||||
/* Uncomment next line if using STM32F2 */
|
||||
/* #define CYASSL_STM32F2 */
|
||||
|
||||
/* Uncomment next line if using Comverge settings */
|
||||
/* #define COMVERGE */
|
||||
|
||||
/* Uncomment next line if using QL SEP settings */
|
||||
/* #define CYASSL_QL */
|
||||
|
||||
/* Uncomment next line if using LwIP native TCP socket settings */
|
||||
/* #define HAVE_LWIP_NATIVE */
|
||||
|
||||
/* Uncomment next line if building for EROAD */
|
||||
/* #define CYASSL_EROAD */
|
||||
|
||||
#include <cyassl/ctaocrypt/visibility.h>
|
||||
|
||||
#ifdef IPHONE
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CYASSL_USER_SETTINGS
|
||||
#include <user_settings.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef COMVERGE
|
||||
#define THREADX
|
||||
#define HAVE_NETX
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_FILESYSTEM
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define NO_RSA
|
||||
#define NO_SESSION_CACHE
|
||||
#define HAVE_ECC
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef THREADX
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETX
|
||||
#include "nx_api.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LWIP_NATIVE) /* using LwIP native TCP socket */
|
||||
#define CYASSL_LWIP
|
||||
#define NO_WRITEV
|
||||
#define SINGLE_THREADED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_FILESYSTEM
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_PIC32
|
||||
/* #define CYASSL_MICROCHIP_PIC32MZ */
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define SINGLE_THREADED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_FILESYSTEM
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_MICROCHIP_PIC32MZ
|
||||
#define CYASSL_PIC32MZ_CE
|
||||
#define CYASSL_PIC32MZ_CRYPT
|
||||
#define HAVE_AES_ENGINE
|
||||
#define CYASSL_PIC32MZ_RNG
|
||||
/* #define CYASSL_PIC32MZ_HASH */
|
||||
#define CYASSL_AES_COUNTER
|
||||
#define HAVE_AESGCM
|
||||
#define NO_BIG_INT
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_TCPIP_V5
|
||||
/* include timer functions */
|
||||
#include "TCPIP Stack/TCPIP.h"
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_TCPIP
|
||||
/* include timer, NTP functions */
|
||||
#ifdef MICROCHIP_MPLAB_HARMONY
|
||||
#include "tcpip/tcpip.h"
|
||||
#else
|
||||
#include "system/system_services.h"
|
||||
#include "tcpip/sntp.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MBED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_FILESYSTEM
|
||||
#define NO_CERT
|
||||
#define USE_CERT_BUFFERS_1024
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define HAVE_ECC
|
||||
#define NO_SESSION_CACHE
|
||||
#define CYASSL_CMSIS_RTOS
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CYASSL_EROAD
|
||||
#define FREESCALE_MQX
|
||||
#define FREESCALE_MMCAU
|
||||
#define SINGLE_THREADED
|
||||
#define NO_STDIO_FILESYSTEM
|
||||
#define CYASSL_LEANPSK
|
||||
#define HAVE_NULL_CIPHER
|
||||
#define NO_OLD_TLS
|
||||
#define NO_ASN
|
||||
#define NO_BIG_INT
|
||||
#define NO_RSA
|
||||
#define NO_DSA
|
||||
#define NO_DH
|
||||
#define NO_CERTS
|
||||
#define NO_PWDBASED
|
||||
#define NO_DES3
|
||||
#define NO_MD4
|
||||
#define NO_RC4
|
||||
#define NO_MD5
|
||||
#define NO_SESSION_CACHE
|
||||
#define NO_MAIN_DRIVER
|
||||
#endif
|
||||
|
||||
#ifdef FREERTOS_WINSIM
|
||||
#define FREERTOS
|
||||
#define USE_WINDOWS_API
|
||||
#endif
|
||||
|
||||
|
||||
/* Micrium will use Visual Studio for compilation but not the Win32 API */
|
||||
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) \
|
||||
&& !defined(EBSNET) && !defined(CYASSL_EROAD)
|
||||
#define USE_WINDOWS_API
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CYASSL_LEANPSK) && !defined(XMALLOC_USER)
|
||||
#include <stdlib.h>
|
||||
#define XMALLOC(s, h, type) malloc((s))
|
||||
#define XFREE(p, h, type) free((p))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
#endif
|
||||
|
||||
#if defined(XMALLOC_USER) && defined(SSN_BUILDING_LIBYASSL)
|
||||
#undef XMALLOC
|
||||
#define XMALLOC yaXMALLOC
|
||||
#undef XFREE
|
||||
#define XFREE yaXFREE
|
||||
#undef XREALLOC
|
||||
#define XREALLOC yaXREALLOC
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FREERTOS
|
||||
#ifndef NO_WRITEV
|
||||
#define NO_WRITEV
|
||||
#endif
|
||||
#ifndef NO_SHA512
|
||||
#define NO_SHA512
|
||||
#endif
|
||||
#ifndef NO_DH
|
||||
#define NO_DH
|
||||
#endif
|
||||
#ifndef NO_DSA
|
||||
#define NO_DSA
|
||||
#endif
|
||||
#ifndef NO_HC128
|
||||
#define NO_HC128
|
||||
#endif
|
||||
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "FreeRTOS.h"
|
||||
#include "semphr.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef EBSNET
|
||||
#include "rtip.h"
|
||||
|
||||
/* #define DEBUG_CYASSL */
|
||||
#define NO_CYASSL_DIR /* tbd */
|
||||
|
||||
#if (POLLOS)
|
||||
#define SINGLE_THREADED
|
||||
#endif
|
||||
|
||||
#if (RTPLATFORM)
|
||||
#if (!RTP_LITTLE_ENDIAN)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#else
|
||||
#if (!KS_LITTLE_ENDIAN)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (WINMSP3)
|
||||
#undef SIZEOF_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#else
|
||||
#sslpro: settings.h - please implement SIZEOF_LONG and SIZEOF_LONG_LONG
|
||||
#endif
|
||||
|
||||
#define XMALLOC(s, h, type) ((void *)rtp_malloc((s), SSL_PRO_MALLOC))
|
||||
#define XFREE(p, h, type) (rtp_free(p))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
|
||||
#endif /* EBSNET */
|
||||
|
||||
#ifdef CYASSL_GAME_BUILD
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#if defined(__PPU) || defined(__XENON)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_LSR
|
||||
#define HAVE_WEBSERVER
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define CYASSL_LOW_MEMORY
|
||||
#define NO_WRITEV
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_RABBIT
|
||||
#ifndef NO_FILESYSTEM
|
||||
#define LSR_FS
|
||||
#include "inc/hw_types.h"
|
||||
#include "fs.h"
|
||||
#endif
|
||||
#define CYASSL_LWIP
|
||||
#include <errno.h> /* for tcp errno */
|
||||
#define CYASSL_SAFERTOS
|
||||
#if defined(__IAR_SYSTEMS_ICC__)
|
||||
/* enum uses enum */
|
||||
#pragma diag_suppress=Pa089
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_SAFERTOS
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "SafeRTOS/semphr.h"
|
||||
#endif
|
||||
|
||||
#include "SafeRTOS/heap.h"
|
||||
#define XMALLOC(s, h, type) pvPortMalloc((s))
|
||||
#define XFREE(p, h, type) vPortFree((p))
|
||||
#define XREALLOC(p, n, h, t) pvPortRealloc((p), (n))
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_LOW_MEMORY
|
||||
#undef RSA_LOW_MEM
|
||||
#define RSA_LOW_MEM
|
||||
#undef CYASSL_SMALL_STACK
|
||||
#define CYASSL_SMALL_STACK
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#ifdef FREESCALE_MQX
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_RABBIT
|
||||
#define NO_CYASSL_DIR
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define FREESCALE_K70_RNGA
|
||||
/* #define FREESCALE_K53_RNGB */
|
||||
#include "mqx.h"
|
||||
#ifndef NO_FILESYSTEM
|
||||
#include "mfs.h"
|
||||
#include "fio.h"
|
||||
#endif
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "mutex.h"
|
||||
#endif
|
||||
|
||||
#define XMALLOC(s, h, t) (void *)_mem_alloc_system((s))
|
||||
#define XFREE(p, h, t) {void* xp = (p); if ((xp)) _mem_free((xp));}
|
||||
/* Note: MQX has no realloc, using fastmath above */
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_STM32F2
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_RABBIT
|
||||
#define STM32F2_RNG
|
||||
#define STM32F2_CRYPTO
|
||||
#define KEIL_INTRINSICS
|
||||
#endif
|
||||
|
||||
#ifdef MICRIUM
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "net_cfg.h"
|
||||
#include "ssl_cfg.h"
|
||||
#include "net_secure_os.h"
|
||||
|
||||
#define CYASSL_TYPES
|
||||
|
||||
typedef CPU_INT08U byte;
|
||||
typedef CPU_INT16U word16;
|
||||
typedef CPU_INT32U word32;
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_WORD_SIZE == CPU_WORD_SIZE_32)
|
||||
#define SIZEOF_LONG 4
|
||||
#undef SIZEOF_LONG_LONG
|
||||
#else
|
||||
#undef SIZEOF_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
#define STRING_USER
|
||||
|
||||
#define XSTRLEN(pstr) ((CPU_SIZE_T)Str_Len((CPU_CHAR *)(pstr)))
|
||||
#define XSTRNCPY(pstr_dest, pstr_src, len_max) \
|
||||
((CPU_CHAR *)Str_Copy_N((CPU_CHAR *)(pstr_dest), \
|
||||
(CPU_CHAR *)(pstr_src), (CPU_SIZE_T)(len_max)))
|
||||
#define XSTRNCMP(pstr_1, pstr_2, len_max) \
|
||||
((CPU_INT16S)Str_Cmp_N((CPU_CHAR *)(pstr_1), \
|
||||
(CPU_CHAR *)(pstr_2), (CPU_SIZE_T)(len_max)))
|
||||
#define XSTRSTR(pstr, pstr_srch) \
|
||||
((CPU_CHAR *)Str_Str((CPU_CHAR *)(pstr), \
|
||||
(CPU_CHAR *)(pstr_srch)))
|
||||
#define XMEMSET(pmem, data_val, size) \
|
||||
((void)Mem_Set((void *)(pmem), (CPU_INT08U) (data_val), \
|
||||
(CPU_SIZE_T)(size)))
|
||||
#define XMEMCPY(pdest, psrc, size) ((void)Mem_Copy((void *)(pdest), \
|
||||
(void *)(psrc), (CPU_SIZE_T)(size)))
|
||||
#define XMEMCMP(pmem_1, pmem_2, size) \
|
||||
(((CPU_BOOLEAN)Mem_Cmp((void *)(pmem_1), (void *)(pmem_2), \
|
||||
(CPU_SIZE_T)(size))) ? DEF_NO : DEF_YES)
|
||||
#define XMEMMOVE XMEMCPY
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED)
|
||||
#define MICRIUM_MALLOC
|
||||
#define XMALLOC(s, h, type) ((void *)NetSecure_BlkGet((CPU_INT08U)(type), \
|
||||
(CPU_SIZE_T)(s), (void *)0))
|
||||
#define XFREE(p, h, type) (NetSecure_BlkFree((CPU_INT08U)(type), \
|
||||
(p), (void *)0))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
#endif
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_FS_EN == DEF_ENABLED)
|
||||
#undef NO_FILESYSTEM
|
||||
#else
|
||||
#define NO_FILESYSTEM
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_TRACE_LEVEL == CYASSL_TRACE_LEVEL_DBG)
|
||||
#define DEBUG_CYASSL
|
||||
#else
|
||||
#undef DEBUG_CYASSL
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_OPENSSL_EN == DEF_ENABLED)
|
||||
#define OPENSSL_EXTRA
|
||||
#else
|
||||
#undef OPENSSL_EXTRA
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_MULTI_THREAD_EN == DEF_ENABLED)
|
||||
#undef SINGLE_THREADED
|
||||
#else
|
||||
#define SINGLE_THREADED
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DH_EN == DEF_ENABLED)
|
||||
#undef NO_DH
|
||||
#else
|
||||
#define NO_DH
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DSA_EN == DEF_ENABLED)
|
||||
#undef NO_DSA
|
||||
#else
|
||||
#define NO_DSA
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_PSK_EN == DEF_ENABLED)
|
||||
#undef NO_PSK
|
||||
#else
|
||||
#define NO_PSK
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_3DES_EN == DEF_ENABLED)
|
||||
#undef NO_DES
|
||||
#else
|
||||
#define NO_DES
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_AES_EN == DEF_ENABLED)
|
||||
#undef NO_AES
|
||||
#else
|
||||
#define NO_AES
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_RC4_EN == DEF_ENABLED)
|
||||
#undef NO_RC4
|
||||
#else
|
||||
#define NO_RC4
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_RABBIT_EN == DEF_ENABLED)
|
||||
#undef NO_RABBIT
|
||||
#else
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_HC128_EN == DEF_ENABLED)
|
||||
#undef NO_HC128
|
||||
#else
|
||||
#define NO_HC128
|
||||
#endif
|
||||
|
||||
#if (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#else
|
||||
#undef BIG_ENDIAN_ORDER
|
||||
#define LITTLE_ENDIAN_ORDER
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_MD4_EN == DEF_ENABLED)
|
||||
#undef NO_MD4
|
||||
#else
|
||||
#define NO_MD4
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_WRITEV_EN == DEF_ENABLED)
|
||||
#undef NO_WRITEV
|
||||
#else
|
||||
#define NO_WRITEV
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_USER_RNG_SEED_EN == DEF_ENABLED)
|
||||
#define NO_DEV_RANDOM
|
||||
#else
|
||||
#undef NO_DEV_RANDOM
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_USER_IO_EN == DEF_ENABLED)
|
||||
#define CYASSL_USER_IO
|
||||
#else
|
||||
#undef CYASSL_USER_IO
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DYNAMIC_BUFFERS_EN == DEF_ENABLED)
|
||||
#undef LARGE_STATIC_BUFFERS
|
||||
#undef STATIC_CHUNKS_ONLY
|
||||
#else
|
||||
#define LARGE_STATIC_BUFFERS
|
||||
#define STATIC_CHUNKS_ONLY
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DER_LOAD_EN == DEF_ENABLED)
|
||||
#define CYASSL_DER_LOAD
|
||||
#else
|
||||
#undef CYASSL_DER_LOAD
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DTLS_EN == DEF_ENABLED)
|
||||
#define CYASSL_DTLS
|
||||
#else
|
||||
#undef CYASSL_DTLS
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_CALLBACKS_EN == DEF_ENABLED)
|
||||
#define CYASSL_CALLBACKS
|
||||
#else
|
||||
#undef CYASSL_CALLBACKS
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_FAST_MATH_EN == DEF_ENABLED)
|
||||
#define USE_FAST_MATH
|
||||
#else
|
||||
#undef USE_FAST_MATH
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_TFM_TIMING_RESISTANT_EN == DEF_ENABLED)
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#else
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#endif /* MICRIUM */
|
||||
|
||||
|
||||
#ifdef CYASSL_QL
|
||||
#ifndef CYASSL_SEP
|
||||
#define CYASSL_SEP
|
||||
#endif
|
||||
#ifndef OPENSSL_EXTRA
|
||||
#define OPENSSL_EXTRA
|
||||
#endif
|
||||
#ifndef SESSION_CERTS
|
||||
#define SESSION_CERTS
|
||||
#endif
|
||||
#ifndef HAVE_AESCCM
|
||||
#define HAVE_AESCCM
|
||||
#endif
|
||||
#ifndef ATOMIC_USER
|
||||
#define ATOMIC_USER
|
||||
#endif
|
||||
#ifndef CYASSL_DER_LOAD
|
||||
#define CYASSL_DER_LOAD
|
||||
#endif
|
||||
#ifndef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
#ifndef HAVE_ECC
|
||||
#define HAVE_ECC
|
||||
#endif
|
||||
#ifndef SESSION_INDEX
|
||||
#define SESSION_INDEX
|
||||
#endif
|
||||
#endif /* CYASSL_QL */
|
||||
|
||||
|
||||
#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \
|
||||
!defined(CYASSL_LEANPSK) && !defined(NO_CYASSL_MEMORY)
|
||||
#define USE_CYASSL_MEMORY
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS)
|
||||
#undef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
|
||||
|
||||
/* stream ciphers except arc4 need 32bit alignment, intel ok without */
|
||||
#ifndef XSTREAM_ALIGNMENT
|
||||
#if defined(__x86_64__) || defined(__ia64__) || defined(__i386__)
|
||||
#define NO_XSTREAM_ALIGNMENT
|
||||
#else
|
||||
#define XSTREAM_ALIGNMENT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* if using hardware crypto and have alignment requirements, specify the
|
||||
requirement here. The record header of SSL/TLS will prvent easy alignment.
|
||||
This hint tries to help as much as possible. */
|
||||
#ifndef CYASSL_GENERAL_ALIGNMENT
|
||||
#ifdef CYASSL_AESNI
|
||||
#define CYASSL_GENERAL_ALIGNMENT 16
|
||||
#elif defined(XSTREAM_ALIGNMENT)
|
||||
#define CYASSL_GENERAL_ALIGNMENT 4
|
||||
#else
|
||||
#define CYASSL_GENERAL_ALIGNMENT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CRL
|
||||
/* not widely supported yet */
|
||||
#undef NO_SKID
|
||||
#define NO_SKID
|
||||
#endif
|
||||
|
||||
/* Place any other flags or defines here */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* CTAO_CRYPT_SETTINGS_H */
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
/* #define SINGLE_THREADED or define RTOS option */
|
||||
#define WOLFSSL_CMSIS_RTOS
|
||||
|
||||
/* #define NO_FILESYSTEM or define Filesystem option */
|
||||
#define WOLFSSL_KEIL_FS
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
|
||||
/* #define WOLFSSL_USER_IO or use BSD incompatible TCP stack */
|
||||
#define WOLFSSL_KEIL_TCP_NET /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */
|
||||
|
||||
#define NO_DEV_RANDOM
|
||||
/* define your Rand gen for the operational use */
|
||||
#define WOLFSSL_GENSEED_FORTEST
|
||||
|
||||
#define USE_WOLFSSL_MEMORY
|
||||
#define WOLFSSL_MALLOC_CHECK
|
||||
|
||||
#define XVALIDATEDATE(d, f,t) (0)
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#define NO_WRITEV
|
||||
#define NO_MAIN_DRIVER
|
|
@ -18,23 +18,32 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <cyassl/ctaocrypt/visibility.h>
|
||||
#include <cyassl/ctaocrypt/logging.h>
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
#include "wolfcrypt/test/test.h"
|
||||
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_fs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "cmsis_os.h"
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* System Clock Configuration
|
||||
*----------------------------------------------------------------------------*/
|
||||
void SystemClock_Config(void) {
|
||||
#warning "write MPU specific System Clock Set up\n"
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Initialize a Flash Memory Card
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
#include "rl_fs.h" /* FileSystem definitions */
|
||||
|
||||
static void init_filesystem (void) {
|
||||
int32_t retv;
|
||||
|
||||
|
@ -52,21 +61,27 @@ static void init_filesystem (void) {
|
|||
printf ("Drive M0 initialization failed!\n");
|
||||
}
|
||||
}
|
||||
extern void benchmark_test(void * arg) ;
|
||||
extern void init_time(void) ;
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* mian entry
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
void benchmark_test(void *arg) ;
|
||||
int main()
|
||||
{
|
||||
void * arg = NULL ;
|
||||
void * arg = NULL ;
|
||||
|
||||
init_filesystem ();
|
||||
HAL_Init(); /* Initialize the HAL Library */
|
||||
SystemClock_Config(); /* Configure the System Clock */
|
||||
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
init_filesystem ();
|
||||
#endif
|
||||
osDelay(300) ;
|
||||
|
||||
printf("=== Start: Crypt Benchmark ===\n") ;
|
||||
benchmark_test(arg) ;
|
||||
printf("=== End: Crypt Benchmark ===\n") ;
|
||||
|
||||
printf("=== Start: Crypt Benchmark ===\n") ;
|
||||
benchmark_test(arg) ;
|
||||
printf("=== End: Crypt Benchmark ===\n") ;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
/* time-dummy.c.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "time.h"
|
||||
|
||||
struct tm *Cyassl_MDK_gmtime(const time_t *c)
|
||||
{
|
||||
static struct tm date ;
|
||||
return(&date) ;
|
||||
}
|
||||
|
||||
time_t time(time_t * t) { return 0 ; }
|
|
@ -487,7 +487,7 @@
|
|||
<targetInfo name="CryptTest"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.3">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptTest"/>
|
||||
</targetInfos>
|
||||
|
@ -616,20 +616,20 @@
|
|||
<targetInfo name="CryptTest"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.3"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptTest"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Dummy" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.3"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Dummy" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptTest"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Test" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.3"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Test" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptTest"/>
|
||||
</targetInfos>
|
||||
|
@ -776,54 +776,54 @@
|
|||
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-Crypt.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-Crypt.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-Crypt.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-FS.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-FS.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-FS.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-RTX-TCP-FS.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-RTX-TCP-FS.h</instance>
|
||||
<component Cclass="Other" Cgroup="CyaSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="3.0.0" condition="CyaSSL-RTX,TCP,FS"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cclass="Other" Cgroup="wolfSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="3.9.0" condition="CyaSSL-RTX,TCP,FS"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\Other\config.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-Crypt.h">
|
||||
<instance index="0">RTE\wolfSSL\config-Crypt.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.3"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptTest"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\cyassl\ctaocrypt\settings.h">
|
||||
<file attr="config" category="header" name="wolfssl\wolfssl\ctaocrypt\settings.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package license="cyassl\IDE\MDK5-ARM\Docs\CyaSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\CyaSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\user_settings.h">
|
||||
<instance index="0">RTE\wolfSSL\user_settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.3"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="CryptTest"/>
|
||||
</targetInfos>
|
||||
|
|
|
@ -1,668 +0,0 @@
|
|||
/* settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
/* Place OS specific preprocessor flags, defines, includes here, will be
|
||||
included into every file because types.h includes it */
|
||||
|
||||
|
||||
#ifndef CTAO_CRYPT_SETTINGS_H
|
||||
#define CTAO_CRYPT_SETTINGS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Uncomment next line if using IPHONE */
|
||||
/* #define IPHONE */
|
||||
|
||||
/* Uncomment next line if using ThreadX */
|
||||
/* #define THREADX */
|
||||
|
||||
/* Uncomment next line if using Micrium ucOS */
|
||||
/* #define MICRIUM */
|
||||
|
||||
/* Uncomment next line if using Mbed */
|
||||
/* #define MBED */
|
||||
|
||||
/* Uncomment next line if using Microchip PIC32 ethernet starter kit */
|
||||
/* #define MICROCHIP_PIC32 */
|
||||
|
||||
/* Uncomment next line if using Microchip TCP/IP stack, version 5 */
|
||||
/* #define MICROCHIP_TCPIP_V5 */
|
||||
|
||||
/* Uncomment next line if using Microchip TCP/IP stack, version 6 or later */
|
||||
/* #define MICROCHIP_TCPIP */
|
||||
|
||||
/* Uncomment next line if using PIC32MZ Crypto Engine */
|
||||
/* #define CYASSL_MICROCHIP_PIC32MZ */
|
||||
|
||||
/* Uncomment next line if using FreeRTOS */
|
||||
/* #define FREERTOS */
|
||||
|
||||
/* Uncomment next line if using FreeRTOS Windows Simulator */
|
||||
/* #define FREERTOS_WINSIM */
|
||||
|
||||
/* Uncomment next line if using RTIP */
|
||||
/* #define EBSNET */
|
||||
|
||||
/* Uncomment next line if using lwip */
|
||||
/* #define CYASSL_LWIP */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for a game console */
|
||||
/* #define CYASSL_GAME_BUILD */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for LSR */
|
||||
/* #define CYASSL_LSR */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for Freescale MQX/RTCS/MFS */
|
||||
/* #define FREESCALE_MQX */
|
||||
|
||||
/* Uncomment next line if using STM32F2 */
|
||||
/* #define CYASSL_STM32F2 */
|
||||
|
||||
/* Uncomment next line if using Comverge settings */
|
||||
/* #define COMVERGE */
|
||||
|
||||
/* Uncomment next line if using QL SEP settings */
|
||||
/* #define CYASSL_QL */
|
||||
|
||||
/* Uncomment next line if using LwIP native TCP socket settings */
|
||||
/* #define HAVE_LWIP_NATIVE */
|
||||
|
||||
/* Uncomment next line if building for EROAD */
|
||||
/* #define CYASSL_EROAD */
|
||||
|
||||
#include <cyassl/ctaocrypt/visibility.h>
|
||||
|
||||
#ifdef IPHONE
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CYASSL_USER_SETTINGS
|
||||
#include <user_settings.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef COMVERGE
|
||||
#define THREADX
|
||||
#define HAVE_NETX
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_FILESYSTEM
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define NO_RSA
|
||||
#define NO_SESSION_CACHE
|
||||
#define HAVE_ECC
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef THREADX
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETX
|
||||
#include "nx_api.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LWIP_NATIVE) /* using LwIP native TCP socket */
|
||||
#define CYASSL_LWIP
|
||||
#define NO_WRITEV
|
||||
#define SINGLE_THREADED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_FILESYSTEM
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_PIC32
|
||||
/* #define CYASSL_MICROCHIP_PIC32MZ */
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define SINGLE_THREADED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_FILESYSTEM
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_MICROCHIP_PIC32MZ
|
||||
#define CYASSL_PIC32MZ_CE
|
||||
#define CYASSL_PIC32MZ_CRYPT
|
||||
#define HAVE_AES_ENGINE
|
||||
#define CYASSL_PIC32MZ_RNG
|
||||
/* #define CYASSL_PIC32MZ_HASH */
|
||||
#define CYASSL_AES_COUNTER
|
||||
#define HAVE_AESGCM
|
||||
#define NO_BIG_INT
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_TCPIP_V5
|
||||
/* include timer functions */
|
||||
#include "TCPIP Stack/TCPIP.h"
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_TCPIP
|
||||
/* include timer, NTP functions */
|
||||
#ifdef MICROCHIP_MPLAB_HARMONY
|
||||
#include "tcpip/tcpip.h"
|
||||
#else
|
||||
#include "system/system_services.h"
|
||||
#include "tcpip/sntp.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MBED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_FILESYSTEM
|
||||
#define NO_CERT
|
||||
#define USE_CERT_BUFFERS_1024
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define HAVE_ECC
|
||||
#define NO_SESSION_CACHE
|
||||
#define CYASSL_CMSIS_RTOS
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CYASSL_EROAD
|
||||
#define FREESCALE_MQX
|
||||
#define FREESCALE_MMCAU
|
||||
#define SINGLE_THREADED
|
||||
#define NO_STDIO_FILESYSTEM
|
||||
#define CYASSL_LEANPSK
|
||||
#define HAVE_NULL_CIPHER
|
||||
#define NO_OLD_TLS
|
||||
#define NO_ASN
|
||||
#define NO_BIG_INT
|
||||
#define NO_RSA
|
||||
#define NO_DSA
|
||||
#define NO_DH
|
||||
#define NO_CERTS
|
||||
#define NO_PWDBASED
|
||||
#define NO_DES3
|
||||
#define NO_MD4
|
||||
#define NO_RC4
|
||||
#define NO_MD5
|
||||
#define NO_SESSION_CACHE
|
||||
#define NO_MAIN_DRIVER
|
||||
#endif
|
||||
|
||||
#ifdef FREERTOS_WINSIM
|
||||
#define FREERTOS
|
||||
#define USE_WINDOWS_API
|
||||
#endif
|
||||
|
||||
|
||||
/* Micrium will use Visual Studio for compilation but not the Win32 API */
|
||||
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) \
|
||||
&& !defined(EBSNET) && !defined(CYASSL_EROAD)
|
||||
#define USE_WINDOWS_API
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CYASSL_LEANPSK) && !defined(XMALLOC_USER)
|
||||
#include <stdlib.h>
|
||||
#define XMALLOC(s, h, type) malloc((s))
|
||||
#define XFREE(p, h, type) free((p))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
#endif
|
||||
|
||||
#if defined(XMALLOC_USER) && defined(SSN_BUILDING_LIBYASSL)
|
||||
#undef XMALLOC
|
||||
#define XMALLOC yaXMALLOC
|
||||
#undef XFREE
|
||||
#define XFREE yaXFREE
|
||||
#undef XREALLOC
|
||||
#define XREALLOC yaXREALLOC
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FREERTOS
|
||||
#ifndef NO_WRITEV
|
||||
#define NO_WRITEV
|
||||
#endif
|
||||
#ifndef NO_SHA512
|
||||
#define NO_SHA512
|
||||
#endif
|
||||
#ifndef NO_DH
|
||||
#define NO_DH
|
||||
#endif
|
||||
#ifndef NO_DSA
|
||||
#define NO_DSA
|
||||
#endif
|
||||
#ifndef NO_HC128
|
||||
#define NO_HC128
|
||||
#endif
|
||||
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "FreeRTOS.h"
|
||||
#include "semphr.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef EBSNET
|
||||
#include "rtip.h"
|
||||
|
||||
/* #define DEBUG_CYASSL */
|
||||
#define NO_CYASSL_DIR /* tbd */
|
||||
|
||||
#if (POLLOS)
|
||||
#define SINGLE_THREADED
|
||||
#endif
|
||||
|
||||
#if (RTPLATFORM)
|
||||
#if (!RTP_LITTLE_ENDIAN)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#else
|
||||
#if (!KS_LITTLE_ENDIAN)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (WINMSP3)
|
||||
#undef SIZEOF_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#else
|
||||
#sslpro: settings.h - please implement SIZEOF_LONG and SIZEOF_LONG_LONG
|
||||
#endif
|
||||
|
||||
#define XMALLOC(s, h, type) ((void *)rtp_malloc((s), SSL_PRO_MALLOC))
|
||||
#define XFREE(p, h, type) (rtp_free(p))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
|
||||
#endif /* EBSNET */
|
||||
|
||||
#ifdef CYASSL_GAME_BUILD
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#if defined(__PPU) || defined(__XENON)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_LSR
|
||||
#define HAVE_WEBSERVER
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define CYASSL_LOW_MEMORY
|
||||
#define NO_WRITEV
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_RABBIT
|
||||
#ifndef NO_FILESYSTEM
|
||||
#define LSR_FS
|
||||
#include "inc/hw_types.h"
|
||||
#include "fs.h"
|
||||
#endif
|
||||
#define CYASSL_LWIP
|
||||
#include <errno.h> /* for tcp errno */
|
||||
#define CYASSL_SAFERTOS
|
||||
#if defined(__IAR_SYSTEMS_ICC__)
|
||||
/* enum uses enum */
|
||||
#pragma diag_suppress=Pa089
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_SAFERTOS
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "SafeRTOS/semphr.h"
|
||||
#endif
|
||||
|
||||
#include "SafeRTOS/heap.h"
|
||||
#define XMALLOC(s, h, type) pvPortMalloc((s))
|
||||
#define XFREE(p, h, type) vPortFree((p))
|
||||
#define XREALLOC(p, n, h, t) pvPortRealloc((p), (n))
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_LOW_MEMORY
|
||||
#undef RSA_LOW_MEM
|
||||
#define RSA_LOW_MEM
|
||||
#undef CYASSL_SMALL_STACK
|
||||
#define CYASSL_SMALL_STACK
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#ifdef FREESCALE_MQX
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_RABBIT
|
||||
#define NO_CYASSL_DIR
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define FREESCALE_K70_RNGA
|
||||
/* #define FREESCALE_K53_RNGB */
|
||||
#include "mqx.h"
|
||||
#ifndef NO_FILESYSTEM
|
||||
#include "mfs.h"
|
||||
#include "fio.h"
|
||||
#endif
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "mutex.h"
|
||||
#endif
|
||||
|
||||
#define XMALLOC(s, h, t) (void *)_mem_alloc_system((s))
|
||||
#define XFREE(p, h, t) {void* xp = (p); if ((xp)) _mem_free((xp));}
|
||||
/* Note: MQX has no realloc, using fastmath above */
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_STM32F2
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_RABBIT
|
||||
#define STM32F2_RNG
|
||||
#define STM32F2_CRYPTO
|
||||
#define KEIL_INTRINSICS
|
||||
#endif
|
||||
|
||||
#ifdef MICRIUM
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "net_cfg.h"
|
||||
#include "ssl_cfg.h"
|
||||
#include "net_secure_os.h"
|
||||
|
||||
#define CYASSL_TYPES
|
||||
|
||||
typedef CPU_INT08U byte;
|
||||
typedef CPU_INT16U word16;
|
||||
typedef CPU_INT32U word32;
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_WORD_SIZE == CPU_WORD_SIZE_32)
|
||||
#define SIZEOF_LONG 4
|
||||
#undef SIZEOF_LONG_LONG
|
||||
#else
|
||||
#undef SIZEOF_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
#define STRING_USER
|
||||
|
||||
#define XSTRLEN(pstr) ((CPU_SIZE_T)Str_Len((CPU_CHAR *)(pstr)))
|
||||
#define XSTRNCPY(pstr_dest, pstr_src, len_max) \
|
||||
((CPU_CHAR *)Str_Copy_N((CPU_CHAR *)(pstr_dest), \
|
||||
(CPU_CHAR *)(pstr_src), (CPU_SIZE_T)(len_max)))
|
||||
#define XSTRNCMP(pstr_1, pstr_2, len_max) \
|
||||
((CPU_INT16S)Str_Cmp_N((CPU_CHAR *)(pstr_1), \
|
||||
(CPU_CHAR *)(pstr_2), (CPU_SIZE_T)(len_max)))
|
||||
#define XSTRSTR(pstr, pstr_srch) \
|
||||
((CPU_CHAR *)Str_Str((CPU_CHAR *)(pstr), \
|
||||
(CPU_CHAR *)(pstr_srch)))
|
||||
#define XMEMSET(pmem, data_val, size) \
|
||||
((void)Mem_Set((void *)(pmem), (CPU_INT08U) (data_val), \
|
||||
(CPU_SIZE_T)(size)))
|
||||
#define XMEMCPY(pdest, psrc, size) ((void)Mem_Copy((void *)(pdest), \
|
||||
(void *)(psrc), (CPU_SIZE_T)(size)))
|
||||
#define XMEMCMP(pmem_1, pmem_2, size) \
|
||||
(((CPU_BOOLEAN)Mem_Cmp((void *)(pmem_1), (void *)(pmem_2), \
|
||||
(CPU_SIZE_T)(size))) ? DEF_NO : DEF_YES)
|
||||
#define XMEMMOVE XMEMCPY
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED)
|
||||
#define MICRIUM_MALLOC
|
||||
#define XMALLOC(s, h, type) ((void *)NetSecure_BlkGet((CPU_INT08U)(type), \
|
||||
(CPU_SIZE_T)(s), (void *)0))
|
||||
#define XFREE(p, h, type) (NetSecure_BlkFree((CPU_INT08U)(type), \
|
||||
(p), (void *)0))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
#endif
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_FS_EN == DEF_ENABLED)
|
||||
#undef NO_FILESYSTEM
|
||||
#else
|
||||
#define NO_FILESYSTEM
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_TRACE_LEVEL == CYASSL_TRACE_LEVEL_DBG)
|
||||
#define DEBUG_CYASSL
|
||||
#else
|
||||
#undef DEBUG_CYASSL
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_OPENSSL_EN == DEF_ENABLED)
|
||||
#define OPENSSL_EXTRA
|
||||
#else
|
||||
#undef OPENSSL_EXTRA
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_MULTI_THREAD_EN == DEF_ENABLED)
|
||||
#undef SINGLE_THREADED
|
||||
#else
|
||||
#define SINGLE_THREADED
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DH_EN == DEF_ENABLED)
|
||||
#undef NO_DH
|
||||
#else
|
||||
#define NO_DH
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DSA_EN == DEF_ENABLED)
|
||||
#undef NO_DSA
|
||||
#else
|
||||
#define NO_DSA
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_PSK_EN == DEF_ENABLED)
|
||||
#undef NO_PSK
|
||||
#else
|
||||
#define NO_PSK
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_3DES_EN == DEF_ENABLED)
|
||||
#undef NO_DES
|
||||
#else
|
||||
#define NO_DES
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_AES_EN == DEF_ENABLED)
|
||||
#undef NO_AES
|
||||
#else
|
||||
#define NO_AES
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_RC4_EN == DEF_ENABLED)
|
||||
#undef NO_RC4
|
||||
#else
|
||||
#define NO_RC4
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_RABBIT_EN == DEF_ENABLED)
|
||||
#undef NO_RABBIT
|
||||
#else
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_HC128_EN == DEF_ENABLED)
|
||||
#undef NO_HC128
|
||||
#else
|
||||
#define NO_HC128
|
||||
#endif
|
||||
|
||||
#if (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#else
|
||||
#undef BIG_ENDIAN_ORDER
|
||||
#define LITTLE_ENDIAN_ORDER
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_MD4_EN == DEF_ENABLED)
|
||||
#undef NO_MD4
|
||||
#else
|
||||
#define NO_MD4
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_WRITEV_EN == DEF_ENABLED)
|
||||
#undef NO_WRITEV
|
||||
#else
|
||||
#define NO_WRITEV
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_USER_RNG_SEED_EN == DEF_ENABLED)
|
||||
#define NO_DEV_RANDOM
|
||||
#else
|
||||
#undef NO_DEV_RANDOM
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_USER_IO_EN == DEF_ENABLED)
|
||||
#define CYASSL_USER_IO
|
||||
#else
|
||||
#undef CYASSL_USER_IO
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DYNAMIC_BUFFERS_EN == DEF_ENABLED)
|
||||
#undef LARGE_STATIC_BUFFERS
|
||||
#undef STATIC_CHUNKS_ONLY
|
||||
#else
|
||||
#define LARGE_STATIC_BUFFERS
|
||||
#define STATIC_CHUNKS_ONLY
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DER_LOAD_EN == DEF_ENABLED)
|
||||
#define CYASSL_DER_LOAD
|
||||
#else
|
||||
#undef CYASSL_DER_LOAD
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DTLS_EN == DEF_ENABLED)
|
||||
#define CYASSL_DTLS
|
||||
#else
|
||||
#undef CYASSL_DTLS
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_CALLBACKS_EN == DEF_ENABLED)
|
||||
#define CYASSL_CALLBACKS
|
||||
#else
|
||||
#undef CYASSL_CALLBACKS
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_FAST_MATH_EN == DEF_ENABLED)
|
||||
#define USE_FAST_MATH
|
||||
#else
|
||||
#undef USE_FAST_MATH
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_TFM_TIMING_RESISTANT_EN == DEF_ENABLED)
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#else
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#endif /* MICRIUM */
|
||||
|
||||
|
||||
#ifdef CYASSL_QL
|
||||
#ifndef CYASSL_SEP
|
||||
#define CYASSL_SEP
|
||||
#endif
|
||||
#ifndef OPENSSL_EXTRA
|
||||
#define OPENSSL_EXTRA
|
||||
#endif
|
||||
#ifndef SESSION_CERTS
|
||||
#define SESSION_CERTS
|
||||
#endif
|
||||
#ifndef HAVE_AESCCM
|
||||
#define HAVE_AESCCM
|
||||
#endif
|
||||
#ifndef ATOMIC_USER
|
||||
#define ATOMIC_USER
|
||||
#endif
|
||||
#ifndef CYASSL_DER_LOAD
|
||||
#define CYASSL_DER_LOAD
|
||||
#endif
|
||||
#ifndef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
#ifndef HAVE_ECC
|
||||
#define HAVE_ECC
|
||||
#endif
|
||||
#ifndef SESSION_INDEX
|
||||
#define SESSION_INDEX
|
||||
#endif
|
||||
#endif /* CYASSL_QL */
|
||||
|
||||
|
||||
#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \
|
||||
!defined(CYASSL_LEANPSK) && !defined(NO_CYASSL_MEMORY)
|
||||
#define USE_CYASSL_MEMORY
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS)
|
||||
#undef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
|
||||
|
||||
/* stream ciphers except arc4 need 32bit alignment, intel ok without */
|
||||
#ifndef XSTREAM_ALIGNMENT
|
||||
#if defined(__x86_64__) || defined(__ia64__) || defined(__i386__)
|
||||
#define NO_XSTREAM_ALIGNMENT
|
||||
#else
|
||||
#define XSTREAM_ALIGNMENT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* if using hardware crypto and have alignment requirements, specify the
|
||||
requirement here. The record header of SSL/TLS will prvent easy alignment.
|
||||
This hint tries to help as much as possible. */
|
||||
#ifndef CYASSL_GENERAL_ALIGNMENT
|
||||
#ifdef CYASSL_AESNI
|
||||
#define CYASSL_GENERAL_ALIGNMENT 16
|
||||
#elif defined(XSTREAM_ALIGNMENT)
|
||||
#define CYASSL_GENERAL_ALIGNMENT 4
|
||||
#else
|
||||
#define CYASSL_GENERAL_ALIGNMENT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CRL
|
||||
/* not widely supported yet */
|
||||
#undef NO_SKID
|
||||
#define NO_SKID
|
||||
#endif
|
||||
|
||||
/* Place any other flags or defines here */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* CTAO_CRYPT_SETTINGS_H */
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
/* #define SINGLE_THREADED or define RTOS option */
|
||||
#define WOLFSSL_CMSIS_RTOS
|
||||
|
||||
/* #define NO_FILESYSTEM or define Filesystem option */
|
||||
#define WOLFSSL_KEIL_FS
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
|
||||
/* #define WOLFSSL_USER_IO or use BSD incompatible TCP stack */
|
||||
#define WOLFSSL_KEIL_TCP_NET /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */
|
||||
|
||||
#define NO_DEV_RANDOM
|
||||
/* define your Rand gen for the operational use */
|
||||
#define WOLFSSL_GENSEED_FORTEST
|
||||
|
||||
#define USE_WOLFSSL_MEMORY
|
||||
#define WOLFSSL_MALLOC_CHECK
|
||||
|
||||
#define XVALIDATEDATE(d, f,t) (0)
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#define NO_WRITEV
|
||||
#define NO_MAIN_DRIVER
|
||||
#define WOLFSSL_MDK_SHELL
|
||||
|
|
@ -18,24 +18,30 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <cyassl/ctaocrypt/visibility.h>
|
||||
#include <cyassl/ctaocrypt/logging.h>
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
#include "wolfcrypt/test/test.h"
|
||||
#include "cmsis_os.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "stm32f2xx_hal.h"
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* System Clock Configuration
|
||||
*----------------------------------------------------------------------------*/
|
||||
void SystemClock_Config(void) {
|
||||
#warning "write MPU specific System Clock Set up\n"
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Initialize a Flash Memory Card
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
#include "rl_fs.h"
|
||||
#include "rl_fs.h" /* FileSystem definitions */
|
||||
|
||||
static void init_filesystem (void) {
|
||||
int32_t retv;
|
||||
|
@ -56,8 +62,6 @@ static void init_filesystem (void) {
|
|||
}
|
||||
#endif
|
||||
|
||||
extern void ctaocrypt_test(void * arg) ;
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* mian entry
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
@ -66,12 +70,16 @@ int main()
|
|||
{
|
||||
void * arg = NULL ;
|
||||
|
||||
HAL_Init(); /* Initialize the HAL Library */
|
||||
SystemClock_Config(); /* Configure the System Clock */
|
||||
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
init_filesystem ();
|
||||
#endif
|
||||
|
||||
osDelay(1000) ;
|
||||
|
||||
printf("=== Start: Crypt test ===\n") ;
|
||||
ctaocrypt_test(arg) ;
|
||||
wolfcrypt_test(arg) ;
|
||||
printf("=== End: Crypt test ===\n") ;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
/* time-dummy.c.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "time.h"
|
||||
|
||||
struct tm *Cyassl_MDK_gmtime(const time_t *c)
|
||||
{
|
||||
static struct tm date ;
|
||||
return(&date) ;
|
||||
}
|
||||
|
||||
time_t time(time_t * t) { return 0 ; }
|
|
@ -471,6 +471,41 @@
|
|||
</Targets>
|
||||
|
||||
<RTE>
|
||||
<packages>
|
||||
<filter>
|
||||
<targetInfos/>
|
||||
</filter>
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="MDK-Network_DS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="0.10.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
</packages>
|
||||
<apis>
|
||||
<api Capiversion="2.01" Cclass="CMSIS Driver" Cgroup="Ethernet MAC" exclusive="0">
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0"/>
|
||||
|
@ -654,20 +689,20 @@
|
|||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.9" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.9"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.6.9" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.9"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="echoClient" Cvendor="wolfSSL" Cversion="3.6.9" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.9"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="echoClient" Cvendor="wolfSSL" Cversion="" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
|
@ -838,68 +873,68 @@
|
|||
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="6.4.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-Crypt.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-Crypt.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-Crypt.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-CyaSSL.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-CyaSSL.h</instance>
|
||||
<component Cclass="Other" Cgroup="CyaSSL" Csub="Core" Cvendor="wolfSSL" Cversion="2.7.0" condition="CyaSSL-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-wolfSSL.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-wolfSSL.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfSSL-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-RTX-TCP-FS.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-RTX-TCP-FS.h</instance>
|
||||
<component Cclass="Other" Cgroup="CyaSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="2.7.0" condition="CyaSSL-RTX,TCP,FS"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<component Cclass="Other" Cgroup="wolfSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfSSL-RTX,TCP,FS"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\Other\config.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-Crypt.h">
|
||||
<instance index="0">RTE\wolfSSL\config-Crypt.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-CyaSSL.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config-CyaSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="CyaSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.0.0" condition="CyaSSL-Core"/>
|
||||
<package license="cyassl\IDE\MDK5-ARM\Docs\CyaSSL-Licnese.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.0.0"/>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-wolfSSL.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config-wolfSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-Licnese.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-wolfSSL.h">
|
||||
<instance index="0">RTE\wolfSSL\config-wolfSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\wolfssl\wolfcrypt\settings.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.4." condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.4.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\user_settings.h">
|
||||
<instance index="0">RTE\wolfSSL\user_settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
|
|
|
@ -1,628 +0,0 @@
|
|||
/* settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
/* Place OS specific preprocessor flags, defines, includes here, will be
|
||||
included into every file because types.h includes it */
|
||||
|
||||
|
||||
#ifndef CTAO_CRYPT_SETTINGS_H
|
||||
#define CTAO_CRYPT_SETTINGS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Uncomment next line if using IPHONE */
|
||||
/* #define IPHONE */
|
||||
|
||||
/* Uncomment next line if using ThreadX */
|
||||
/* #define THREADX */
|
||||
|
||||
/* Uncomment next line if using Micrium ucOS */
|
||||
/* #define MICRIUM */
|
||||
|
||||
/* Uncomment next line if using Mbed */
|
||||
/* #define MBED */
|
||||
|
||||
/* Uncomment next line if using Microchip PIC32 ethernet starter kit */
|
||||
/* #define MICROCHIP_PIC32 */
|
||||
|
||||
/* Uncomment next line if using Microchip TCP/IP stack, version 5 */
|
||||
/* #define MICROCHIP_TCPIP_V5 */
|
||||
|
||||
/* Uncomment next line if using Microchip TCP/IP stack, version 6 or later */
|
||||
/* #define MICROCHIP_TCPIP */
|
||||
|
||||
/* Uncomment next line if using FreeRTOS */
|
||||
/* #define FREERTOS */
|
||||
|
||||
/* Uncomment next line if using FreeRTOS Windows Simulator */
|
||||
/* #define FREERTOS_WINSIM */
|
||||
|
||||
/* Uncomment next line if using RTIP */
|
||||
/* #define EBSNET */
|
||||
|
||||
/* Uncomment next line if using lwip */
|
||||
/* #define CYASSL_LWIP */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for a game console */
|
||||
/* #define CYASSL_GAME_BUILD */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for LSR */
|
||||
/* #define CYASSL_LSR */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for Freescale MQX/RTCS/MFS */
|
||||
/* #define FREESCALE_MQX */
|
||||
|
||||
/* Uncomment next line if using STM32F2 */
|
||||
/* #define CYASSL_STM32F2 */
|
||||
|
||||
/* Uncomment next line if using Comverge settings */
|
||||
/* #define COMVERGE */
|
||||
|
||||
/* Uncomment next line if using QL SEP settings */
|
||||
/* #define CYASSL_QL */
|
||||
|
||||
|
||||
#include <cyassl/ctaocrypt/visibility.h>
|
||||
|
||||
#ifdef IPHONE
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef COMVERGE
|
||||
#define THREADX
|
||||
#define HAVE_NETX
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_FILESYSTEM
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define NO_RSA
|
||||
#define NO_SESSION_CACHE
|
||||
#define HAVE_ECC
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef THREADX
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETX
|
||||
#include "nx_api.h"
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_PIC32
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define SINGLE_THREADED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_FILESYSTEM
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_TCPIP_V5
|
||||
/* include timer functions */
|
||||
#include "TCPIP Stack/TCPIP.h"
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_TCPIP
|
||||
/* include timer, NTP functions */
|
||||
#include "system/system_services.h"
|
||||
#ifdef MICROCHIP_MPLAB_HARMONY
|
||||
#include "tcpip/tcpip.h"
|
||||
#else
|
||||
#include "tcpip/sntp.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MBED
|
||||
#define SINGLE_THREADED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#endif /* MBED */
|
||||
|
||||
#ifdef CYASSL_TYTO
|
||||
#include "rand.h"
|
||||
#define FREERTOS
|
||||
#define NO_FILESYSTEM
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_DEV_RANDOM
|
||||
#define HAVE_ECC
|
||||
#define HAVE_ECC_ENCRYPT
|
||||
#define ECC_SHAMIR
|
||||
#define HAVE_HKDF
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define FP_MAX_BITS 512
|
||||
#define NO_OLD_TLS
|
||||
#define NO_MD4
|
||||
#define NO_RABBIT
|
||||
#define NO_HC128
|
||||
#define NO_RSA
|
||||
#define NO_DSA
|
||||
#define NO_PWDBASED
|
||||
#define NO_PSK
|
||||
#endif
|
||||
|
||||
#ifdef FREERTOS_WINSIM
|
||||
#define FREERTOS
|
||||
#define USE_WINDOWS_API
|
||||
#endif
|
||||
|
||||
|
||||
/* Micrium will use Visual Studio for compilation but not the Win32 API */
|
||||
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) \
|
||||
&& !defined(EBSNET)
|
||||
#define USE_WINDOWS_API
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CYASSL_LEANPSK) && !defined(XMALLOC_USER)
|
||||
#include <stdlib.h>
|
||||
#define XMALLOC(s, h, type) malloc((s))
|
||||
#define XFREE(p, h, type) free((p))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
#endif
|
||||
|
||||
#if defined(XMALLOC_USER) && defined(SSN_BUILDING_LIBYASSL)
|
||||
#undef XMALLOC
|
||||
#define XMALLOC yaXMALLOC
|
||||
#undef XFREE
|
||||
#define XFREE yaXFREE
|
||||
#undef XREALLOC
|
||||
#define XREALLOC yaXREALLOC
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FREERTOS
|
||||
#ifndef NO_WRITEV
|
||||
#define NO_WRITEV
|
||||
#endif
|
||||
#ifndef NO_SHA512
|
||||
#define NO_SHA512
|
||||
#endif
|
||||
#ifndef NO_DH
|
||||
#define NO_DH
|
||||
#endif
|
||||
#ifndef NO_DSA
|
||||
#define NO_DSA
|
||||
#endif
|
||||
#ifndef NO_HC128
|
||||
#define NO_HC128
|
||||
#endif
|
||||
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "FreeRTOS.h"
|
||||
#include "semphr.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef EBSNET
|
||||
#include "rtip.h"
|
||||
|
||||
/* #define DEBUG_CYASSL */
|
||||
#define NO_CYASSL_DIR /* tbd */
|
||||
|
||||
#if (POLLOS)
|
||||
#define SINGLE_THREADED
|
||||
#endif
|
||||
|
||||
#if (RTPLATFORM)
|
||||
#if (!RTP_LITTLE_ENDIAN)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#else
|
||||
#if (!KS_LITTLE_ENDIAN)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (WINMSP3)
|
||||
#undef SIZEOF_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#else
|
||||
#sslpro: settings.h - please implement SIZEOF_LONG and SIZEOF_LONG_LONG
|
||||
#endif
|
||||
|
||||
#define XMALLOC(s, h, type) ((void *)rtp_malloc((s), SSL_PRO_MALLOC))
|
||||
#define XFREE(p, h, type) (rtp_free(p))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
|
||||
#endif /* EBSNET */
|
||||
|
||||
#ifdef CYASSL_GAME_BUILD
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#if defined(__PPU) || defined(__XENON)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_LSR
|
||||
#define HAVE_WEBSERVER
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define CYASSL_LOW_MEMORY
|
||||
#define NO_WRITEV
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_RABBIT
|
||||
#ifndef NO_FILESYSTEM
|
||||
#define LSR_FS
|
||||
#include "inc/hw_types.h"
|
||||
#include "fs.h"
|
||||
#endif
|
||||
#define CYASSL_LWIP
|
||||
#include <errno.h> /* for tcp errno */
|
||||
#define CYASSL_SAFERTOS
|
||||
#if defined(__IAR_SYSTEMS_ICC__)
|
||||
/* enum uses enum */
|
||||
#pragma diag_suppress=Pa089
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_SAFERTOS
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "SafeRTOS/semphr.h"
|
||||
#endif
|
||||
|
||||
#include "SafeRTOS/heap.h"
|
||||
#define XMALLOC(s, h, type) pvPortMalloc((s))
|
||||
#define XFREE(p, h, type) vPortFree((p))
|
||||
#define XREALLOC(p, n, h, t) pvPortRealloc((p), (n))
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_LOW_MEMORY
|
||||
#undef RSA_LOW_MEM
|
||||
#define RSA_LOW_MEM
|
||||
#undef CYASSL_SMALL_STACK
|
||||
#define CYASSL_SMALL_STACK
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#ifdef FREESCALE_MQX
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_RABBIT
|
||||
#define NO_CYASSL_DIR
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define FREESCALE_K70_RNGA
|
||||
/* #define FREESCALE_K53_RNGB */
|
||||
#include "mqx.h"
|
||||
#ifndef NO_FILESYSTEM
|
||||
#include "mfs.h"
|
||||
#include "fio.h"
|
||||
#endif
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "mutex.h"
|
||||
#endif
|
||||
|
||||
#define XMALLOC(s, h, t) (void *)_mem_alloc_system((s))
|
||||
#define XFREE(p, h, t) {void* xp = (p); if ((xp)) _mem_free((xp));}
|
||||
/* Note: MQX has no realloc, using fastmath above */
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_STM32F2
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_RABBIT
|
||||
#define STM32F2_RNG
|
||||
#define STM32F2_CRYPTO
|
||||
#define KEIL_INTRINSICS
|
||||
#endif
|
||||
|
||||
#ifdef MICRIUM
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "net_cfg.h"
|
||||
#include "ssl_cfg.h"
|
||||
#include "net_secure_os.h"
|
||||
|
||||
#define CYASSL_TYPES
|
||||
|
||||
typedef CPU_INT08U byte;
|
||||
typedef CPU_INT16U word16;
|
||||
typedef CPU_INT32U word32;
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_WORD_SIZE == CPU_WORD_SIZE_32)
|
||||
#define SIZEOF_LONG 4
|
||||
#undef SIZEOF_LONG_LONG
|
||||
#else
|
||||
#undef SIZEOF_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
#define STRING_USER
|
||||
|
||||
#define XSTRLEN(pstr) ((CPU_SIZE_T)Str_Len((CPU_CHAR *)(pstr)))
|
||||
#define XSTRNCPY(pstr_dest, pstr_src, len_max) \
|
||||
((CPU_CHAR *)Str_Copy_N((CPU_CHAR *)(pstr_dest), \
|
||||
(CPU_CHAR *)(pstr_src), (CPU_SIZE_T)(len_max)))
|
||||
#define XSTRNCMP(pstr_1, pstr_2, len_max) \
|
||||
((CPU_INT16S)Str_Cmp_N((CPU_CHAR *)(pstr_1), \
|
||||
(CPU_CHAR *)(pstr_2), (CPU_SIZE_T)(len_max)))
|
||||
#define XSTRSTR(pstr, pstr_srch) \
|
||||
((CPU_CHAR *)Str_Str((CPU_CHAR *)(pstr), \
|
||||
(CPU_CHAR *)(pstr_srch)))
|
||||
#define XMEMSET(pmem, data_val, size) \
|
||||
((void)Mem_Set((void *)(pmem), (CPU_INT08U) (data_val), \
|
||||
(CPU_SIZE_T)(size)))
|
||||
#define XMEMCPY(pdest, psrc, size) ((void)Mem_Copy((void *)(pdest), \
|
||||
(void *)(psrc), (CPU_SIZE_T)(size)))
|
||||
#define XMEMCMP(pmem_1, pmem_2, size) \
|
||||
(((CPU_BOOLEAN)Mem_Cmp((void *)(pmem_1), (void *)(pmem_2), \
|
||||
(CPU_SIZE_T)(size))) ? DEF_NO : DEF_YES)
|
||||
#define XMEMMOVE XMEMCPY
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED)
|
||||
#define MICRIUM_MALLOC
|
||||
#define XMALLOC(s, h, type) ((void *)NetSecure_BlkGet((CPU_INT08U)(type), \
|
||||
(CPU_SIZE_T)(s), (void *)0))
|
||||
#define XFREE(p, h, type) (NetSecure_BlkFree((CPU_INT08U)(type), \
|
||||
(p), (void *)0))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
#endif
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_FS_EN == DEF_ENABLED)
|
||||
#undef NO_FILESYSTEM
|
||||
#else
|
||||
#define NO_FILESYSTEM
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_TRACE_LEVEL == CYASSL_TRACE_LEVEL_DBG)
|
||||
#define DEBUG_CYASSL
|
||||
#else
|
||||
#undef DEBUG_CYASSL
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_OPENSSL_EN == DEF_ENABLED)
|
||||
#define OPENSSL_EXTRA
|
||||
#else
|
||||
#undef OPENSSL_EXTRA
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_MULTI_THREAD_EN == DEF_ENABLED)
|
||||
#undef SINGLE_THREADED
|
||||
#else
|
||||
#define SINGLE_THREADED
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DH_EN == DEF_ENABLED)
|
||||
#undef NO_DH
|
||||
#else
|
||||
#define NO_DH
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DSA_EN == DEF_ENABLED)
|
||||
#undef NO_DSA
|
||||
#else
|
||||
#define NO_DSA
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_PSK_EN == DEF_ENABLED)
|
||||
#undef NO_PSK
|
||||
#else
|
||||
#define NO_PSK
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_3DES_EN == DEF_ENABLED)
|
||||
#undef NO_DES
|
||||
#else
|
||||
#define NO_DES
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_AES_EN == DEF_ENABLED)
|
||||
#undef NO_AES
|
||||
#else
|
||||
#define NO_AES
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_RC4_EN == DEF_ENABLED)
|
||||
#undef NO_RC4
|
||||
#else
|
||||
#define NO_RC4
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_RABBIT_EN == DEF_ENABLED)
|
||||
#undef NO_RABBIT
|
||||
#else
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_HC128_EN == DEF_ENABLED)
|
||||
#undef NO_HC128
|
||||
#else
|
||||
#define NO_HC128
|
||||
#endif
|
||||
|
||||
#if (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#else
|
||||
#undef BIG_ENDIAN_ORDER
|
||||
#define LITTLE_ENDIAN_ORDER
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_MD4_EN == DEF_ENABLED)
|
||||
#undef NO_MD4
|
||||
#else
|
||||
#define NO_MD4
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_WRITEV_EN == DEF_ENABLED)
|
||||
#undef NO_WRITEV
|
||||
#else
|
||||
#define NO_WRITEV
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_USER_RNG_SEED_EN == DEF_ENABLED)
|
||||
#define NO_DEV_RANDOM
|
||||
#else
|
||||
#undef NO_DEV_RANDOM
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_USER_IO_EN == DEF_ENABLED)
|
||||
#define CYASSL_USER_IO
|
||||
#else
|
||||
#undef CYASSL_USER_IO
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DYNAMIC_BUFFERS_EN == DEF_ENABLED)
|
||||
#undef LARGE_STATIC_BUFFERS
|
||||
#undef STATIC_CHUNKS_ONLY
|
||||
#else
|
||||
#define LARGE_STATIC_BUFFERS
|
||||
#define STATIC_CHUNKS_ONLY
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DER_LOAD_EN == DEF_ENABLED)
|
||||
#define CYASSL_DER_LOAD
|
||||
#else
|
||||
#undef CYASSL_DER_LOAD
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DTLS_EN == DEF_ENABLED)
|
||||
#define CYASSL_DTLS
|
||||
#else
|
||||
#undef CYASSL_DTLS
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_CALLBACKS_EN == DEF_ENABLED)
|
||||
#define CYASSL_CALLBACKS
|
||||
#else
|
||||
#undef CYASSL_CALLBACKS
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_FAST_MATH_EN == DEF_ENABLED)
|
||||
#define USE_FAST_MATH
|
||||
#else
|
||||
#undef USE_FAST_MATH
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_TFM_TIMING_RESISTANT_EN == DEF_ENABLED)
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#else
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#endif /* MICRIUM */
|
||||
|
||||
|
||||
#ifdef CYASSL_QL
|
||||
#ifndef CYASSL_SEP
|
||||
#define CYASSL_SEP
|
||||
#endif
|
||||
#ifndef OPENSSL_EXTRA
|
||||
#define OPENSSL_EXTRA
|
||||
#endif
|
||||
#ifndef SESSION_CERTS
|
||||
#define SESSION_CERTS
|
||||
#endif
|
||||
#ifndef HAVE_AESCCM
|
||||
#define HAVE_AESCCM
|
||||
#endif
|
||||
#ifndef ATOMIC_USER
|
||||
#define ATOMIC_USER
|
||||
#endif
|
||||
#ifndef CYASSL_DER_LOAD
|
||||
#define CYASSL_DER_LOAD
|
||||
#endif
|
||||
#ifndef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
#ifndef HAVE_ECC
|
||||
#define HAVE_ECC
|
||||
#endif
|
||||
#ifndef SESSION_INDEX
|
||||
#define SESSION_INDEX
|
||||
#endif
|
||||
#endif /* CYASSL_QL */
|
||||
|
||||
|
||||
#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \
|
||||
!defined(CYASSL_LEANPSK) && !defined(NO_CYASSL_MEMORY)
|
||||
#define USE_CYASSL_MEMORY
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS)
|
||||
#undef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
|
||||
|
||||
/* stream ciphers except arc4 need 32bit alignment, intel ok without */
|
||||
#ifndef XSTREAM_ALIGNMENT
|
||||
#if defined(__x86_64__) || defined(__ia64__) || defined(__i386__)
|
||||
#define NO_XSTREAM_ALIGNMENT
|
||||
#else
|
||||
#define XSTREAM_ALIGNMENT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* if using hardware crypto and have alignment requirements, specify the
|
||||
requirement here. The record header of SSL/TLS will prvent easy alignment.
|
||||
This hint tries to help as much as possible. */
|
||||
#ifndef CYASSL_GENERAL_ALIGNMENT
|
||||
#ifdef CYASSL_AESNI
|
||||
#define CYASSL_GENERAL_ALIGNMENT 16
|
||||
#elif defined(XSTREAM_ALIGNMENT)
|
||||
#define CYASSL_GENERAL_ALIGNMENT 4
|
||||
#else
|
||||
#define CYASSL_GENERAL_ALIGNMENT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CRL
|
||||
/* not widely supported yet */
|
||||
#undef NO_SKID
|
||||
#define NO_SKID
|
||||
#endif
|
||||
|
||||
/* Place any other flags or defines here */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* CTAO_CRYPT_SETTINGS_H */
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
/* #define SINGLE_THREADED or define RTOS option */
|
||||
#define WOLFSSL_CMSIS_RTOS
|
||||
|
||||
/* #define NO_FILESYSTEM or define Filesystem option */
|
||||
#define WOLFSSL_KEIL_FS
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
|
||||
/* #define WOLFSSL_USER_IO or use BSD incompatible TCP stack */
|
||||
#define WOLFSSL_KEIL_TCP_NET /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */
|
||||
|
||||
#define NO_DEV_RANDOM
|
||||
/* define your Rand gen for the operational use */
|
||||
#define WOLFSSL_GENSEED_FORTEST
|
||||
|
||||
#define USE_WOLFSSL_MEMORY
|
||||
#define WOLFSSL_MALLOC_CHECK
|
||||
|
||||
#define XVALIDATEDATE(d, f,t) (0)
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#define NO_WRITEV
|
||||
#define NO_MAIN_DRIVER
|
||||
#define WOLFSSL_MDK_SHELL
|
||||
|
|
@ -18,25 +18,33 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <cyassl/ctaocrypt/visibility.h>
|
||||
#include <cyassl/ctaocrypt/logging.h>
|
||||
#include <wolfssl/wolfcrypt/visibility.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_fs.h"
|
||||
#include "rl_net.h"
|
||||
#include <stdio.h>
|
||||
#include "cyassl_MDK_ARM.h"
|
||||
#include <cyassl/ssl.h>
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Initialize Clock Configuration
|
||||
*----------------------------------------------------------------------------*/
|
||||
void SystemClock_Config(void) {
|
||||
#warning "write MPU specific System Clock Set up\n"
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Initialize a Flash Memory Card
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
#include "rl_fs.h"
|
||||
static void init_filesystem (void) {
|
||||
int32_t retv;
|
||||
|
||||
|
@ -54,18 +62,7 @@ static void init_filesystem (void) {
|
|||
printf ("Drive M0 initialization failed!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* TCP/IP tasks
|
||||
*----------------------------------------------------------------------------*/
|
||||
void tcp_poll (void const *arg)
|
||||
{
|
||||
CYASSL_MSG("TCP polling started.\n") ;
|
||||
while (1) {
|
||||
net_main ();
|
||||
osDelay(1) ;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
|
@ -73,30 +70,31 @@ typedef struct func_args {
|
|||
} func_args;
|
||||
|
||||
extern void echoclient_test(func_args * args) ;
|
||||
extern void init_time(void) ;
|
||||
|
||||
osThreadDef (tcp_poll, osPriorityHigh , 1, 0) ;
|
||||
/*-----------------------------------------------------------------------------
|
||||
* mian entry
|
||||
*----------------------------------------------------------------------------*/
|
||||
int myoptind = 0;
|
||||
char* myoptarg = NULL;
|
||||
|
||||
#include "config-EchoClient.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
func_args args = { 0 } ;
|
||||
|
||||
{
|
||||
func_args args ;
|
||||
args.argc = 1 ;
|
||||
|
||||
SystemClock_Config ();
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
init_filesystem ();
|
||||
net_initialize() ;
|
||||
osThreadCreate (osThread (tcp_poll), NULL);
|
||||
osDelay(30000) ; /* wait for DHCP */
|
||||
#if defined(DEBUG_CYASSL)
|
||||
#endif
|
||||
netInitialize() ;
|
||||
osDelay(300) ;
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
printf("Turning ON Debug message\n") ;
|
||||
CyaSSL_Debugging_ON() ;
|
||||
wolfSSL_Debugging_ON() ;
|
||||
#endif
|
||||
|
||||
printf("Starting EchoClient, Enter messages to EchoServer (\"quit\" to quit the program)\n") ;
|
||||
echoclient_test(&args) ;
|
||||
printf("End of EchoClient\n") ;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
/* time-dummy.c.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "time.h"
|
||||
|
||||
struct tm *Cyassl_MDK_gmtime(const time_t *c)
|
||||
{
|
||||
static struct tm date ;
|
||||
return(&date) ;
|
||||
}
|
||||
|
||||
time_t time(time_t * t) { return 0 ; }
|
|
@ -471,6 +471,41 @@
|
|||
</Targets>
|
||||
|
||||
<RTE>
|
||||
<packages>
|
||||
<filter>
|
||||
<targetInfos/>
|
||||
</filter>
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="MDK-Network_DS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="0.10.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
</packages>
|
||||
<apis>
|
||||
<api Capiversion="2.01" Cclass="CMSIS Driver" Cgroup="Ethernet MAC" exclusive="0">
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0"/>
|
||||
|
@ -654,20 +689,20 @@
|
|||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="echoServer" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="echoServer" Cvendor="wolfSSL" Cversion="" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
|
@ -838,71 +873,69 @@
|
|||
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="6.4.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-Crypt.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-Crypt.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-Crypt.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-CyaSSL.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-CyaSSL.h</instance>
|
||||
<component Cclass="Other" Cgroup="CyaSSL" Csub="Core" Cvendor="wolfSSL" Cversion="2.7.0" condition="CyaSSL-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-wolfSSL.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-wolfSSL.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfSSL-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-RTX-TCP-FS.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-RTX-TCP-FS.h</instance>
|
||||
<component Cclass="Other" Cgroup="CyaSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="2.7.0" condition="CyaSSL-RTX,TCP,FS"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<component Cclass="Other" Cgroup="wolfSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfSSL-RTX,TCP,FS"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\Other\config.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-Crypt.h">
|
||||
<instance index="0">RTE\wolfSSL\config-Crypt.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-CyaSSL.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config-CyaSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="CyaSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.0.0" condition="CyaSSL-Core"/>
|
||||
<package license="cyassl\IDE\MDK5-ARM\Docs\CyaSSL-Licnese.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.0.0"/>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-wolfSSL.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config-wolfSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-Licnese.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-wolfSSL.h">
|
||||
<instance index="0">RTE\wolfSSL\config-wolfSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\wolfssl\wolfcrypt\settings.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.4." condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.4.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\user_settings.h">
|
||||
<instance index="0">RTE\wolfSSL\user_settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
<instance index="0" removed="1">RTE\wolfSSL\user_settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
</files>
|
||||
</RTE>
|
||||
|
|
|
@ -1,628 +0,0 @@
|
|||
/* settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
/* Place OS specific preprocessor flags, defines, includes here, will be
|
||||
included into every file because types.h includes it */
|
||||
|
||||
|
||||
#ifndef CTAO_CRYPT_SETTINGS_H
|
||||
#define CTAO_CRYPT_SETTINGS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Uncomment next line if using IPHONE */
|
||||
/* #define IPHONE */
|
||||
|
||||
/* Uncomment next line if using ThreadX */
|
||||
/* #define THREADX */
|
||||
|
||||
/* Uncomment next line if using Micrium ucOS */
|
||||
/* #define MICRIUM */
|
||||
|
||||
/* Uncomment next line if using Mbed */
|
||||
/* #define MBED */
|
||||
|
||||
/* Uncomment next line if using Microchip PIC32 ethernet starter kit */
|
||||
/* #define MICROCHIP_PIC32 */
|
||||
|
||||
/* Uncomment next line if using Microchip TCP/IP stack, version 5 */
|
||||
/* #define MICROCHIP_TCPIP_V5 */
|
||||
|
||||
/* Uncomment next line if using Microchip TCP/IP stack, version 6 or later */
|
||||
/* #define MICROCHIP_TCPIP */
|
||||
|
||||
/* Uncomment next line if using FreeRTOS */
|
||||
/* #define FREERTOS */
|
||||
|
||||
/* Uncomment next line if using FreeRTOS Windows Simulator */
|
||||
/* #define FREERTOS_WINSIM */
|
||||
|
||||
/* Uncomment next line if using RTIP */
|
||||
/* #define EBSNET */
|
||||
|
||||
/* Uncomment next line if using lwip */
|
||||
/* #define CYASSL_LWIP */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for a game console */
|
||||
/* #define CYASSL_GAME_BUILD */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for LSR */
|
||||
/* #define CYASSL_LSR */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for Freescale MQX/RTCS/MFS */
|
||||
/* #define FREESCALE_MQX */
|
||||
|
||||
/* Uncomment next line if using STM32F2 */
|
||||
/* #define CYASSL_STM32F2 */
|
||||
|
||||
/* Uncomment next line if using Comverge settings */
|
||||
/* #define COMVERGE */
|
||||
|
||||
/* Uncomment next line if using QL SEP settings */
|
||||
/* #define CYASSL_QL */
|
||||
|
||||
|
||||
#include <cyassl/ctaocrypt/visibility.h>
|
||||
|
||||
#ifdef IPHONE
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef COMVERGE
|
||||
#define THREADX
|
||||
#define HAVE_NETX
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_FILESYSTEM
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define NO_RSA
|
||||
#define NO_SESSION_CACHE
|
||||
#define HAVE_ECC
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef THREADX
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETX
|
||||
#include "nx_api.h"
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_PIC32
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define SINGLE_THREADED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_FILESYSTEM
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_TCPIP_V5
|
||||
/* include timer functions */
|
||||
#include "TCPIP Stack/TCPIP.h"
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_TCPIP
|
||||
/* include timer, NTP functions */
|
||||
#include "system/system_services.h"
|
||||
#ifdef MICROCHIP_MPLAB_HARMONY
|
||||
#include "tcpip/tcpip.h"
|
||||
#else
|
||||
#include "tcpip/sntp.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MBED
|
||||
#define SINGLE_THREADED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#endif /* MBED */
|
||||
|
||||
#ifdef CYASSL_TYTO
|
||||
#include "rand.h"
|
||||
#define FREERTOS
|
||||
#define NO_FILESYSTEM
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_DEV_RANDOM
|
||||
#define HAVE_ECC
|
||||
#define HAVE_ECC_ENCRYPT
|
||||
#define ECC_SHAMIR
|
||||
#define HAVE_HKDF
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define FP_MAX_BITS 512
|
||||
#define NO_OLD_TLS
|
||||
#define NO_MD4
|
||||
#define NO_RABBIT
|
||||
#define NO_HC128
|
||||
#define NO_RSA
|
||||
#define NO_DSA
|
||||
#define NO_PWDBASED
|
||||
#define NO_PSK
|
||||
#endif
|
||||
|
||||
#ifdef FREERTOS_WINSIM
|
||||
#define FREERTOS
|
||||
#define USE_WINDOWS_API
|
||||
#endif
|
||||
|
||||
|
||||
/* Micrium will use Visual Studio for compilation but not the Win32 API */
|
||||
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) \
|
||||
&& !defined(EBSNET)
|
||||
#define USE_WINDOWS_API
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CYASSL_LEANPSK) && !defined(XMALLOC_USER)
|
||||
#include <stdlib.h>
|
||||
#define XMALLOC(s, h, type) malloc((s))
|
||||
#define XFREE(p, h, type) free((p))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
#endif
|
||||
|
||||
#if defined(XMALLOC_USER) && defined(SSN_BUILDING_LIBYASSL)
|
||||
#undef XMALLOC
|
||||
#define XMALLOC yaXMALLOC
|
||||
#undef XFREE
|
||||
#define XFREE yaXFREE
|
||||
#undef XREALLOC
|
||||
#define XREALLOC yaXREALLOC
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FREERTOS
|
||||
#ifndef NO_WRITEV
|
||||
#define NO_WRITEV
|
||||
#endif
|
||||
#ifndef NO_SHA512
|
||||
#define NO_SHA512
|
||||
#endif
|
||||
#ifndef NO_DH
|
||||
#define NO_DH
|
||||
#endif
|
||||
#ifndef NO_DSA
|
||||
#define NO_DSA
|
||||
#endif
|
||||
#ifndef NO_HC128
|
||||
#define NO_HC128
|
||||
#endif
|
||||
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "FreeRTOS.h"
|
||||
#include "semphr.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef EBSNET
|
||||
#include "rtip.h"
|
||||
|
||||
/* #define DEBUG_CYASSL */
|
||||
#define NO_CYASSL_DIR /* tbd */
|
||||
|
||||
#if (POLLOS)
|
||||
#define SINGLE_THREADED
|
||||
#endif
|
||||
|
||||
#if (RTPLATFORM)
|
||||
#if (!RTP_LITTLE_ENDIAN)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#else
|
||||
#if (!KS_LITTLE_ENDIAN)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (WINMSP3)
|
||||
#undef SIZEOF_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#else
|
||||
#sslpro: settings.h - please implement SIZEOF_LONG and SIZEOF_LONG_LONG
|
||||
#endif
|
||||
|
||||
#define XMALLOC(s, h, type) ((void *)rtp_malloc((s), SSL_PRO_MALLOC))
|
||||
#define XFREE(p, h, type) (rtp_free(p))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
|
||||
#endif /* EBSNET */
|
||||
|
||||
#ifdef CYASSL_GAME_BUILD
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#if defined(__PPU) || defined(__XENON)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_LSR
|
||||
#define HAVE_WEBSERVER
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define CYASSL_LOW_MEMORY
|
||||
#define NO_WRITEV
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_RABBIT
|
||||
#ifndef NO_FILESYSTEM
|
||||
#define LSR_FS
|
||||
#include "inc/hw_types.h"
|
||||
#include "fs.h"
|
||||
#endif
|
||||
#define CYASSL_LWIP
|
||||
#include <errno.h> /* for tcp errno */
|
||||
#define CYASSL_SAFERTOS
|
||||
#if defined(__IAR_SYSTEMS_ICC__)
|
||||
/* enum uses enum */
|
||||
#pragma diag_suppress=Pa089
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_SAFERTOS
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "SafeRTOS/semphr.h"
|
||||
#endif
|
||||
|
||||
#include "SafeRTOS/heap.h"
|
||||
#define XMALLOC(s, h, type) pvPortMalloc((s))
|
||||
#define XFREE(p, h, type) vPortFree((p))
|
||||
#define XREALLOC(p, n, h, t) pvPortRealloc((p), (n))
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_LOW_MEMORY
|
||||
#undef RSA_LOW_MEM
|
||||
#define RSA_LOW_MEM
|
||||
#undef CYASSL_SMALL_STACK
|
||||
#define CYASSL_SMALL_STACK
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#ifdef FREESCALE_MQX
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_RABBIT
|
||||
#define NO_CYASSL_DIR
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define FREESCALE_K70_RNGA
|
||||
/* #define FREESCALE_K53_RNGB */
|
||||
#include "mqx.h"
|
||||
#ifndef NO_FILESYSTEM
|
||||
#include "mfs.h"
|
||||
#include "fio.h"
|
||||
#endif
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "mutex.h"
|
||||
#endif
|
||||
|
||||
#define XMALLOC(s, h, t) (void *)_mem_alloc_system((s))
|
||||
#define XFREE(p, h, t) {void* xp = (p); if ((xp)) _mem_free((xp));}
|
||||
/* Note: MQX has no realloc, using fastmath above */
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_STM32F2
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_RABBIT
|
||||
#define STM32F2_RNG
|
||||
#define STM32F2_CRYPTO
|
||||
#define KEIL_INTRINSICS
|
||||
#endif
|
||||
|
||||
#ifdef MICRIUM
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "net_cfg.h"
|
||||
#include "ssl_cfg.h"
|
||||
#include "net_secure_os.h"
|
||||
|
||||
#define CYASSL_TYPES
|
||||
|
||||
typedef CPU_INT08U byte;
|
||||
typedef CPU_INT16U word16;
|
||||
typedef CPU_INT32U word32;
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_WORD_SIZE == CPU_WORD_SIZE_32)
|
||||
#define SIZEOF_LONG 4
|
||||
#undef SIZEOF_LONG_LONG
|
||||
#else
|
||||
#undef SIZEOF_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
#define STRING_USER
|
||||
|
||||
#define XSTRLEN(pstr) ((CPU_SIZE_T)Str_Len((CPU_CHAR *)(pstr)))
|
||||
#define XSTRNCPY(pstr_dest, pstr_src, len_max) \
|
||||
((CPU_CHAR *)Str_Copy_N((CPU_CHAR *)(pstr_dest), \
|
||||
(CPU_CHAR *)(pstr_src), (CPU_SIZE_T)(len_max)))
|
||||
#define XSTRNCMP(pstr_1, pstr_2, len_max) \
|
||||
((CPU_INT16S)Str_Cmp_N((CPU_CHAR *)(pstr_1), \
|
||||
(CPU_CHAR *)(pstr_2), (CPU_SIZE_T)(len_max)))
|
||||
#define XSTRSTR(pstr, pstr_srch) \
|
||||
((CPU_CHAR *)Str_Str((CPU_CHAR *)(pstr), \
|
||||
(CPU_CHAR *)(pstr_srch)))
|
||||
#define XMEMSET(pmem, data_val, size) \
|
||||
((void)Mem_Set((void *)(pmem), (CPU_INT08U) (data_val), \
|
||||
(CPU_SIZE_T)(size)))
|
||||
#define XMEMCPY(pdest, psrc, size) ((void)Mem_Copy((void *)(pdest), \
|
||||
(void *)(psrc), (CPU_SIZE_T)(size)))
|
||||
#define XMEMCMP(pmem_1, pmem_2, size) \
|
||||
(((CPU_BOOLEAN)Mem_Cmp((void *)(pmem_1), (void *)(pmem_2), \
|
||||
(CPU_SIZE_T)(size))) ? DEF_NO : DEF_YES)
|
||||
#define XMEMMOVE XMEMCPY
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED)
|
||||
#define MICRIUM_MALLOC
|
||||
#define XMALLOC(s, h, type) ((void *)NetSecure_BlkGet((CPU_INT08U)(type), \
|
||||
(CPU_SIZE_T)(s), (void *)0))
|
||||
#define XFREE(p, h, type) (NetSecure_BlkFree((CPU_INT08U)(type), \
|
||||
(p), (void *)0))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
#endif
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_FS_EN == DEF_ENABLED)
|
||||
#undef NO_FILESYSTEM
|
||||
#else
|
||||
#define NO_FILESYSTEM
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_TRACE_LEVEL == CYASSL_TRACE_LEVEL_DBG)
|
||||
#define DEBUG_CYASSL
|
||||
#else
|
||||
#undef DEBUG_CYASSL
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_OPENSSL_EN == DEF_ENABLED)
|
||||
#define OPENSSL_EXTRA
|
||||
#else
|
||||
#undef OPENSSL_EXTRA
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_MULTI_THREAD_EN == DEF_ENABLED)
|
||||
#undef SINGLE_THREADED
|
||||
#else
|
||||
#define SINGLE_THREADED
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DH_EN == DEF_ENABLED)
|
||||
#undef NO_DH
|
||||
#else
|
||||
#define NO_DH
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DSA_EN == DEF_ENABLED)
|
||||
#undef NO_DSA
|
||||
#else
|
||||
#define NO_DSA
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_PSK_EN == DEF_ENABLED)
|
||||
#undef NO_PSK
|
||||
#else
|
||||
#define NO_PSK
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_3DES_EN == DEF_ENABLED)
|
||||
#undef NO_DES
|
||||
#else
|
||||
#define NO_DES
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_AES_EN == DEF_ENABLED)
|
||||
#undef NO_AES
|
||||
#else
|
||||
#define NO_AES
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_RC4_EN == DEF_ENABLED)
|
||||
#undef NO_RC4
|
||||
#else
|
||||
#define NO_RC4
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_RABBIT_EN == DEF_ENABLED)
|
||||
#undef NO_RABBIT
|
||||
#else
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_HC128_EN == DEF_ENABLED)
|
||||
#undef NO_HC128
|
||||
#else
|
||||
#define NO_HC128
|
||||
#endif
|
||||
|
||||
#if (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#else
|
||||
#undef BIG_ENDIAN_ORDER
|
||||
#define LITTLE_ENDIAN_ORDER
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_MD4_EN == DEF_ENABLED)
|
||||
#undef NO_MD4
|
||||
#else
|
||||
#define NO_MD4
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_WRITEV_EN == DEF_ENABLED)
|
||||
#undef NO_WRITEV
|
||||
#else
|
||||
#define NO_WRITEV
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_USER_RNG_SEED_EN == DEF_ENABLED)
|
||||
#define NO_DEV_RANDOM
|
||||
#else
|
||||
#undef NO_DEV_RANDOM
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_USER_IO_EN == DEF_ENABLED)
|
||||
#define CYASSL_USER_IO
|
||||
#else
|
||||
#undef CYASSL_USER_IO
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DYNAMIC_BUFFERS_EN == DEF_ENABLED)
|
||||
#undef LARGE_STATIC_BUFFERS
|
||||
#undef STATIC_CHUNKS_ONLY
|
||||
#else
|
||||
#define LARGE_STATIC_BUFFERS
|
||||
#define STATIC_CHUNKS_ONLY
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DER_LOAD_EN == DEF_ENABLED)
|
||||
#define CYASSL_DER_LOAD
|
||||
#else
|
||||
#undef CYASSL_DER_LOAD
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DTLS_EN == DEF_ENABLED)
|
||||
#define CYASSL_DTLS
|
||||
#else
|
||||
#undef CYASSL_DTLS
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_CALLBACKS_EN == DEF_ENABLED)
|
||||
#define CYASSL_CALLBACKS
|
||||
#else
|
||||
#undef CYASSL_CALLBACKS
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_FAST_MATH_EN == DEF_ENABLED)
|
||||
#define USE_FAST_MATH
|
||||
#else
|
||||
#undef USE_FAST_MATH
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_TFM_TIMING_RESISTANT_EN == DEF_ENABLED)
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#else
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#endif /* MICRIUM */
|
||||
|
||||
|
||||
#ifdef CYASSL_QL
|
||||
#ifndef CYASSL_SEP
|
||||
#define CYASSL_SEP
|
||||
#endif
|
||||
#ifndef OPENSSL_EXTRA
|
||||
#define OPENSSL_EXTRA
|
||||
#endif
|
||||
#ifndef SESSION_CERTS
|
||||
#define SESSION_CERTS
|
||||
#endif
|
||||
#ifndef HAVE_AESCCM
|
||||
#define HAVE_AESCCM
|
||||
#endif
|
||||
#ifndef ATOMIC_USER
|
||||
#define ATOMIC_USER
|
||||
#endif
|
||||
#ifndef CYASSL_DER_LOAD
|
||||
#define CYASSL_DER_LOAD
|
||||
#endif
|
||||
#ifndef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
#ifndef HAVE_ECC
|
||||
#define HAVE_ECC
|
||||
#endif
|
||||
#ifndef SESSION_INDEX
|
||||
#define SESSION_INDEX
|
||||
#endif
|
||||
#endif /* CYASSL_QL */
|
||||
|
||||
|
||||
#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \
|
||||
!defined(CYASSL_LEANPSK) && !defined(NO_CYASSL_MEMORY)
|
||||
#define USE_CYASSL_MEMORY
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS)
|
||||
#undef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
|
||||
|
||||
/* stream ciphers except arc4 need 32bit alignment, intel ok without */
|
||||
#ifndef XSTREAM_ALIGNMENT
|
||||
#if defined(__x86_64__) || defined(__ia64__) || defined(__i386__)
|
||||
#define NO_XSTREAM_ALIGNMENT
|
||||
#else
|
||||
#define XSTREAM_ALIGNMENT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* if using hardware crypto and have alignment requirements, specify the
|
||||
requirement here. The record header of SSL/TLS will prvent easy alignment.
|
||||
This hint tries to help as much as possible. */
|
||||
#ifndef CYASSL_GENERAL_ALIGNMENT
|
||||
#ifdef CYASSL_AESNI
|
||||
#define CYASSL_GENERAL_ALIGNMENT 16
|
||||
#elif defined(XSTREAM_ALIGNMENT)
|
||||
#define CYASSL_GENERAL_ALIGNMENT 4
|
||||
#else
|
||||
#define CYASSL_GENERAL_ALIGNMENT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CRL
|
||||
/* not widely supported yet */
|
||||
#undef NO_SKID
|
||||
#define NO_SKID
|
||||
#endif
|
||||
|
||||
/* Place any other flags or defines here */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* CTAO_CRYPT_SETTINGS_H */
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
/* #define SINGLE_THREADED or define RTOS option */
|
||||
#define WOLFSSL_CMSIS_RTOS
|
||||
|
||||
/* #define NO_FILESYSTEM or define Filesystem option */
|
||||
#define WOLFSSL_KEIL_FS
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
|
||||
/* #define WOLFSSL_USER_IO or use BSD incompatible TCP stack */
|
||||
#define WOLFSSL_KEIL_TCP_NET /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */
|
||||
|
||||
#define NO_DEV_RANDOM
|
||||
/* define your Rand gen for the operational use */
|
||||
#define WOLFSSL_GENSEED_FORTEST
|
||||
|
||||
#define USE_WOLFSSL_MEMORY
|
||||
#define WOLFSSL_MALLOC_CHECK
|
||||
|
||||
#define XVALIDATEDATE(d, f,t) (0)
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#define NO_WRITEV
|
||||
#define NO_MAIN_DRIVER
|
||||
#define WOLFSSL_MDK_SHELL
|
||||
|
|
@ -18,53 +18,56 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <cyassl/ctaocrypt/visibility.h>
|
||||
#include <cyassl/ctaocrypt/logging.h>
|
||||
#include <wolfssl/wolfcrypt/visibility.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_fs.h"
|
||||
#include "rl_net.h"
|
||||
#include <stdio.h>
|
||||
#include "cyassl_MDK_ARM.h"
|
||||
#include <cyassl/ssl.h>
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Initialize Clock Configuration
|
||||
*----------------------------------------------------------------------------*/
|
||||
void SystemClock_Config(void) {
|
||||
#warning "write MPU specific System Clock Set up\n"
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Initialize a Flash Memory Card
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
#include "rl_fs.h"
|
||||
static void init_filesystem (void) {
|
||||
int32_t retv;
|
||||
int32_t retv;
|
||||
|
||||
retv = finit ("M0:");
|
||||
retv = finit ("M0:");
|
||||
if (retv == 0) {
|
||||
retv = fmount ("M0:");
|
||||
if (retv == 0) {
|
||||
retv = fmount ("M0:");
|
||||
if (retv == 0) {
|
||||
printf ("Drive M0 ready!\n");
|
||||
}
|
||||
else {
|
||||
printf ("Drive M0 mount failed!\n");
|
||||
}
|
||||
} else {
|
||||
printf ("Drive M0 initialization failed!\n");
|
||||
printf ("Drive M0 ready!\n");
|
||||
}
|
||||
else {
|
||||
printf ("Drive M0 mount failed!\n");
|
||||
}
|
||||
}
|
||||
else {
|
||||
printf ("Drive M0 initialization failed!\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* TCP/IP tasks
|
||||
* mian entry
|
||||
*----------------------------------------------------------------------------*/
|
||||
void tcp_poll (void const *arg)
|
||||
{
|
||||
CYASSL_MSG("TCP polling started.\n") ;
|
||||
while (1) {
|
||||
net_main ();
|
||||
osDelay(1) ;
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
|
@ -72,27 +75,22 @@ typedef struct func_args {
|
|||
} func_args;
|
||||
|
||||
extern void echoserver_test(func_args * args) ;
|
||||
extern void init_time(void) ;
|
||||
|
||||
osThreadDef (tcp_poll, osPriorityHigh, 1, 0) ;
|
||||
/*-----------------------------------------------------------------------------
|
||||
* mian entry
|
||||
*----------------------------------------------------------------------------*/
|
||||
int myoptind = 0;
|
||||
char* myoptarg = NULL;
|
||||
|
||||
int main()
|
||||
{
|
||||
func_args args = { 0 } ;
|
||||
init_filesystem ();
|
||||
net_initialize() ;
|
||||
osThreadCreate (osThread (tcp_poll), NULL);
|
||||
osDelay(10000) ; /* wait for DHCP */
|
||||
#if defined(DEBUG_CYASSL)
|
||||
printf("Turning ON Debug message\n") ;
|
||||
CyaSSL_Debugging_ON() ;
|
||||
#endif
|
||||
func_args args ;
|
||||
args.argc = 1 ;
|
||||
|
||||
SystemClock_Config ();
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
init_filesystem ();
|
||||
#endif
|
||||
netInitialize() ;
|
||||
osDelay(300) ;
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
printf("Turning ON Debug message\n") ;
|
||||
wolfSSL_Debugging_ON() ;
|
||||
#endif
|
||||
printf("echoserver: Started\n") ;
|
||||
echoserver_test(&args) ;
|
||||
printf("echoserver: Terminated\n") ;
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
/* time-dummy.c.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "time.h"
|
||||
|
||||
struct tm *Cyassl_MDK_gmtime(const time_t *c)
|
||||
{
|
||||
static struct tm date ;
|
||||
return(&date) ;
|
||||
}
|
||||
|
||||
time_t time(time_t * t) { return 0 ; }
|
|
@ -1,668 +0,0 @@
|
|||
/* settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
/* Place OS specific preprocessor flags, defines, includes here, will be
|
||||
included into every file because types.h includes it */
|
||||
|
||||
|
||||
#ifndef CTAO_CRYPT_SETTINGS_H
|
||||
#define CTAO_CRYPT_SETTINGS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Uncomment next line if using IPHONE */
|
||||
/* #define IPHONE */
|
||||
|
||||
/* Uncomment next line if using ThreadX */
|
||||
/* #define THREADX */
|
||||
|
||||
/* Uncomment next line if using Micrium ucOS */
|
||||
/* #define MICRIUM */
|
||||
|
||||
/* Uncomment next line if using Mbed */
|
||||
/* #define MBED */
|
||||
|
||||
/* Uncomment next line if using Microchip PIC32 ethernet starter kit */
|
||||
/* #define MICROCHIP_PIC32 */
|
||||
|
||||
/* Uncomment next line if using Microchip TCP/IP stack, version 5 */
|
||||
/* #define MICROCHIP_TCPIP_V5 */
|
||||
|
||||
/* Uncomment next line if using Microchip TCP/IP stack, version 6 or later */
|
||||
/* #define MICROCHIP_TCPIP */
|
||||
|
||||
/* Uncomment next line if using PIC32MZ Crypto Engine */
|
||||
/* #define CYASSL_MICROCHIP_PIC32MZ */
|
||||
|
||||
/* Uncomment next line if using FreeRTOS */
|
||||
/* #define FREERTOS */
|
||||
|
||||
/* Uncomment next line if using FreeRTOS Windows Simulator */
|
||||
/* #define FREERTOS_WINSIM */
|
||||
|
||||
/* Uncomment next line if using RTIP */
|
||||
/* #define EBSNET */
|
||||
|
||||
/* Uncomment next line if using lwip */
|
||||
/* #define CYASSL_LWIP */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for a game console */
|
||||
/* #define CYASSL_GAME_BUILD */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for LSR */
|
||||
/* #define CYASSL_LSR */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for Freescale MQX/RTCS/MFS */
|
||||
/* #define FREESCALE_MQX */
|
||||
|
||||
/* Uncomment next line if using STM32F2 */
|
||||
/* #define CYASSL_STM32F2 */
|
||||
|
||||
/* Uncomment next line if using Comverge settings */
|
||||
/* #define COMVERGE */
|
||||
|
||||
/* Uncomment next line if using QL SEP settings */
|
||||
/* #define CYASSL_QL */
|
||||
|
||||
/* Uncomment next line if using LwIP native TCP socket settings */
|
||||
/* #define HAVE_LWIP_NATIVE */
|
||||
|
||||
/* Uncomment next line if building for EROAD */
|
||||
/* #define CYASSL_EROAD */
|
||||
|
||||
#include <cyassl/ctaocrypt/visibility.h>
|
||||
|
||||
#ifdef IPHONE
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CYASSL_USER_SETTINGS
|
||||
#include <user_settings.h>
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef COMVERGE
|
||||
#define THREADX
|
||||
#define HAVE_NETX
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_FILESYSTEM
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define NO_RSA
|
||||
#define NO_SESSION_CACHE
|
||||
#define HAVE_ECC
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef THREADX
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETX
|
||||
#include "nx_api.h"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LWIP_NATIVE) /* using LwIP native TCP socket */
|
||||
#define CYASSL_LWIP
|
||||
#define NO_WRITEV
|
||||
#define SINGLE_THREADED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_FILESYSTEM
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_PIC32
|
||||
/* #define CYASSL_MICROCHIP_PIC32MZ */
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define SINGLE_THREADED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_FILESYSTEM
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_MICROCHIP_PIC32MZ
|
||||
#define CYASSL_PIC32MZ_CE
|
||||
#define CYASSL_PIC32MZ_CRYPT
|
||||
#define HAVE_AES_ENGINE
|
||||
#define CYASSL_PIC32MZ_RNG
|
||||
/* #define CYASSL_PIC32MZ_HASH */
|
||||
#define CYASSL_AES_COUNTER
|
||||
#define HAVE_AESGCM
|
||||
#define NO_BIG_INT
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_TCPIP_V5
|
||||
/* include timer functions */
|
||||
#include "TCPIP Stack/TCPIP.h"
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_TCPIP
|
||||
/* include timer, NTP functions */
|
||||
#ifdef MICROCHIP_MPLAB_HARMONY
|
||||
#include "tcpip/tcpip.h"
|
||||
#else
|
||||
#include "system/system_services.h"
|
||||
#include "tcpip/sntp.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MBED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_FILESYSTEM
|
||||
#define NO_CERT
|
||||
#define USE_CERT_BUFFERS_1024
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define HAVE_ECC
|
||||
#define NO_SESSION_CACHE
|
||||
#define CYASSL_CMSIS_RTOS
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CYASSL_EROAD
|
||||
#define FREESCALE_MQX
|
||||
#define FREESCALE_MMCAU
|
||||
#define SINGLE_THREADED
|
||||
#define NO_STDIO_FILESYSTEM
|
||||
#define CYASSL_LEANPSK
|
||||
#define HAVE_NULL_CIPHER
|
||||
#define NO_OLD_TLS
|
||||
#define NO_ASN
|
||||
#define NO_BIG_INT
|
||||
#define NO_RSA
|
||||
#define NO_DSA
|
||||
#define NO_DH
|
||||
#define NO_CERTS
|
||||
#define NO_PWDBASED
|
||||
#define NO_DES3
|
||||
#define NO_MD4
|
||||
#define NO_RC4
|
||||
#define NO_MD5
|
||||
#define NO_SESSION_CACHE
|
||||
#define NO_MAIN_DRIVER
|
||||
#endif
|
||||
|
||||
#ifdef FREERTOS_WINSIM
|
||||
#define FREERTOS
|
||||
#define USE_WINDOWS_API
|
||||
#endif
|
||||
|
||||
|
||||
/* Micrium will use Visual Studio for compilation but not the Win32 API */
|
||||
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) \
|
||||
&& !defined(EBSNET) && !defined(CYASSL_EROAD)
|
||||
#define USE_WINDOWS_API
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CYASSL_LEANPSK) && !defined(XMALLOC_USER)
|
||||
#include <stdlib.h>
|
||||
#define XMALLOC(s, h, type) malloc((s))
|
||||
#define XFREE(p, h, type) free((p))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
#endif
|
||||
|
||||
#if defined(XMALLOC_USER) && defined(SSN_BUILDING_LIBYASSL)
|
||||
#undef XMALLOC
|
||||
#define XMALLOC yaXMALLOC
|
||||
#undef XFREE
|
||||
#define XFREE yaXFREE
|
||||
#undef XREALLOC
|
||||
#define XREALLOC yaXREALLOC
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FREERTOS
|
||||
#ifndef NO_WRITEV
|
||||
#define NO_WRITEV
|
||||
#endif
|
||||
#ifndef NO_SHA512
|
||||
#define NO_SHA512
|
||||
#endif
|
||||
#ifndef NO_DH
|
||||
#define NO_DH
|
||||
#endif
|
||||
#ifndef NO_DSA
|
||||
#define NO_DSA
|
||||
#endif
|
||||
#ifndef NO_HC128
|
||||
#define NO_HC128
|
||||
#endif
|
||||
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "FreeRTOS.h"
|
||||
#include "semphr.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef EBSNET
|
||||
#include "rtip.h"
|
||||
|
||||
/* #define DEBUG_CYASSL */
|
||||
#define NO_CYASSL_DIR /* tbd */
|
||||
|
||||
#if (POLLOS)
|
||||
#define SINGLE_THREADED
|
||||
#endif
|
||||
|
||||
#if (RTPLATFORM)
|
||||
#if (!RTP_LITTLE_ENDIAN)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#else
|
||||
#if (!KS_LITTLE_ENDIAN)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (WINMSP3)
|
||||
#undef SIZEOF_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#else
|
||||
#sslpro: settings.h - please implement SIZEOF_LONG and SIZEOF_LONG_LONG
|
||||
#endif
|
||||
|
||||
#define XMALLOC(s, h, type) ((void *)rtp_malloc((s), SSL_PRO_MALLOC))
|
||||
#define XFREE(p, h, type) (rtp_free(p))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
|
||||
#endif /* EBSNET */
|
||||
|
||||
#ifdef CYASSL_GAME_BUILD
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#if defined(__PPU) || defined(__XENON)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_LSR
|
||||
#define HAVE_WEBSERVER
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define CYASSL_LOW_MEMORY
|
||||
#define NO_WRITEV
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_RABBIT
|
||||
#ifndef NO_FILESYSTEM
|
||||
#define LSR_FS
|
||||
#include "inc/hw_types.h"
|
||||
#include "fs.h"
|
||||
#endif
|
||||
#define CYASSL_LWIP
|
||||
#include <errno.h> /* for tcp errno */
|
||||
#define CYASSL_SAFERTOS
|
||||
#if defined(__IAR_SYSTEMS_ICC__)
|
||||
/* enum uses enum */
|
||||
#pragma diag_suppress=Pa089
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_SAFERTOS
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "SafeRTOS/semphr.h"
|
||||
#endif
|
||||
|
||||
#include "SafeRTOS/heap.h"
|
||||
#define XMALLOC(s, h, type) pvPortMalloc((s))
|
||||
#define XFREE(p, h, type) vPortFree((p))
|
||||
#define XREALLOC(p, n, h, t) pvPortRealloc((p), (n))
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_LOW_MEMORY
|
||||
#undef RSA_LOW_MEM
|
||||
#define RSA_LOW_MEM
|
||||
#undef CYASSL_SMALL_STACK
|
||||
#define CYASSL_SMALL_STACK
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#ifdef FREESCALE_MQX
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_RABBIT
|
||||
#define NO_CYASSL_DIR
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define FREESCALE_K70_RNGA
|
||||
/* #define FREESCALE_K53_RNGB */
|
||||
#include "mqx.h"
|
||||
#ifndef NO_FILESYSTEM
|
||||
#include "mfs.h"
|
||||
#include "fio.h"
|
||||
#endif
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "mutex.h"
|
||||
#endif
|
||||
|
||||
#define XMALLOC(s, h, t) (void *)_mem_alloc_system((s))
|
||||
#define XFREE(p, h, t) {void* xp = (p); if ((xp)) _mem_free((xp));}
|
||||
/* Note: MQX has no realloc, using fastmath above */
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_STM32F2
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_RABBIT
|
||||
#define STM32F2_RNG
|
||||
#define STM32F2_CRYPTO
|
||||
#define KEIL_INTRINSICS
|
||||
#endif
|
||||
|
||||
#ifdef MICRIUM
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "net_cfg.h"
|
||||
#include "ssl_cfg.h"
|
||||
#include "net_secure_os.h"
|
||||
|
||||
#define CYASSL_TYPES
|
||||
|
||||
typedef CPU_INT08U byte;
|
||||
typedef CPU_INT16U word16;
|
||||
typedef CPU_INT32U word32;
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_WORD_SIZE == CPU_WORD_SIZE_32)
|
||||
#define SIZEOF_LONG 4
|
||||
#undef SIZEOF_LONG_LONG
|
||||
#else
|
||||
#undef SIZEOF_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
#define STRING_USER
|
||||
|
||||
#define XSTRLEN(pstr) ((CPU_SIZE_T)Str_Len((CPU_CHAR *)(pstr)))
|
||||
#define XSTRNCPY(pstr_dest, pstr_src, len_max) \
|
||||
((CPU_CHAR *)Str_Copy_N((CPU_CHAR *)(pstr_dest), \
|
||||
(CPU_CHAR *)(pstr_src), (CPU_SIZE_T)(len_max)))
|
||||
#define XSTRNCMP(pstr_1, pstr_2, len_max) \
|
||||
((CPU_INT16S)Str_Cmp_N((CPU_CHAR *)(pstr_1), \
|
||||
(CPU_CHAR *)(pstr_2), (CPU_SIZE_T)(len_max)))
|
||||
#define XSTRSTR(pstr, pstr_srch) \
|
||||
((CPU_CHAR *)Str_Str((CPU_CHAR *)(pstr), \
|
||||
(CPU_CHAR *)(pstr_srch)))
|
||||
#define XMEMSET(pmem, data_val, size) \
|
||||
((void)Mem_Set((void *)(pmem), (CPU_INT08U) (data_val), \
|
||||
(CPU_SIZE_T)(size)))
|
||||
#define XMEMCPY(pdest, psrc, size) ((void)Mem_Copy((void *)(pdest), \
|
||||
(void *)(psrc), (CPU_SIZE_T)(size)))
|
||||
#define XMEMCMP(pmem_1, pmem_2, size) \
|
||||
(((CPU_BOOLEAN)Mem_Cmp((void *)(pmem_1), (void *)(pmem_2), \
|
||||
(CPU_SIZE_T)(size))) ? DEF_NO : DEF_YES)
|
||||
#define XMEMMOVE XMEMCPY
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED)
|
||||
#define MICRIUM_MALLOC
|
||||
#define XMALLOC(s, h, type) ((void *)NetSecure_BlkGet((CPU_INT08U)(type), \
|
||||
(CPU_SIZE_T)(s), (void *)0))
|
||||
#define XFREE(p, h, type) (NetSecure_BlkFree((CPU_INT08U)(type), \
|
||||
(p), (void *)0))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
#endif
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_FS_EN == DEF_ENABLED)
|
||||
#undef NO_FILESYSTEM
|
||||
#else
|
||||
#define NO_FILESYSTEM
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_TRACE_LEVEL == CYASSL_TRACE_LEVEL_DBG)
|
||||
#define DEBUG_CYASSL
|
||||
#else
|
||||
#undef DEBUG_CYASSL
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_OPENSSL_EN == DEF_ENABLED)
|
||||
#define OPENSSL_EXTRA
|
||||
#else
|
||||
#undef OPENSSL_EXTRA
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_MULTI_THREAD_EN == DEF_ENABLED)
|
||||
#undef SINGLE_THREADED
|
||||
#else
|
||||
#define SINGLE_THREADED
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DH_EN == DEF_ENABLED)
|
||||
#undef NO_DH
|
||||
#else
|
||||
#define NO_DH
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DSA_EN == DEF_ENABLED)
|
||||
#undef NO_DSA
|
||||
#else
|
||||
#define NO_DSA
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_PSK_EN == DEF_ENABLED)
|
||||
#undef NO_PSK
|
||||
#else
|
||||
#define NO_PSK
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_3DES_EN == DEF_ENABLED)
|
||||
#undef NO_DES
|
||||
#else
|
||||
#define NO_DES
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_AES_EN == DEF_ENABLED)
|
||||
#undef NO_AES
|
||||
#else
|
||||
#define NO_AES
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_RC4_EN == DEF_ENABLED)
|
||||
#undef NO_RC4
|
||||
#else
|
||||
#define NO_RC4
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_RABBIT_EN == DEF_ENABLED)
|
||||
#undef NO_RABBIT
|
||||
#else
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_HC128_EN == DEF_ENABLED)
|
||||
#undef NO_HC128
|
||||
#else
|
||||
#define NO_HC128
|
||||
#endif
|
||||
|
||||
#if (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#else
|
||||
#undef BIG_ENDIAN_ORDER
|
||||
#define LITTLE_ENDIAN_ORDER
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_MD4_EN == DEF_ENABLED)
|
||||
#undef NO_MD4
|
||||
#else
|
||||
#define NO_MD4
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_WRITEV_EN == DEF_ENABLED)
|
||||
#undef NO_WRITEV
|
||||
#else
|
||||
#define NO_WRITEV
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_USER_RNG_SEED_EN == DEF_ENABLED)
|
||||
#define NO_DEV_RANDOM
|
||||
#else
|
||||
#undef NO_DEV_RANDOM
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_USER_IO_EN == DEF_ENABLED)
|
||||
#define CYASSL_USER_IO
|
||||
#else
|
||||
#undef CYASSL_USER_IO
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DYNAMIC_BUFFERS_EN == DEF_ENABLED)
|
||||
#undef LARGE_STATIC_BUFFERS
|
||||
#undef STATIC_CHUNKS_ONLY
|
||||
#else
|
||||
#define LARGE_STATIC_BUFFERS
|
||||
#define STATIC_CHUNKS_ONLY
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DER_LOAD_EN == DEF_ENABLED)
|
||||
#define CYASSL_DER_LOAD
|
||||
#else
|
||||
#undef CYASSL_DER_LOAD
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DTLS_EN == DEF_ENABLED)
|
||||
#define CYASSL_DTLS
|
||||
#else
|
||||
#undef CYASSL_DTLS
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_CALLBACKS_EN == DEF_ENABLED)
|
||||
#define CYASSL_CALLBACKS
|
||||
#else
|
||||
#undef CYASSL_CALLBACKS
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_FAST_MATH_EN == DEF_ENABLED)
|
||||
#define USE_FAST_MATH
|
||||
#else
|
||||
#undef USE_FAST_MATH
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_TFM_TIMING_RESISTANT_EN == DEF_ENABLED)
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#else
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#endif /* MICRIUM */
|
||||
|
||||
|
||||
#ifdef CYASSL_QL
|
||||
#ifndef CYASSL_SEP
|
||||
#define CYASSL_SEP
|
||||
#endif
|
||||
#ifndef OPENSSL_EXTRA
|
||||
#define OPENSSL_EXTRA
|
||||
#endif
|
||||
#ifndef SESSION_CERTS
|
||||
#define SESSION_CERTS
|
||||
#endif
|
||||
#ifndef HAVE_AESCCM
|
||||
#define HAVE_AESCCM
|
||||
#endif
|
||||
#ifndef ATOMIC_USER
|
||||
#define ATOMIC_USER
|
||||
#endif
|
||||
#ifndef CYASSL_DER_LOAD
|
||||
#define CYASSL_DER_LOAD
|
||||
#endif
|
||||
#ifndef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
#ifndef HAVE_ECC
|
||||
#define HAVE_ECC
|
||||
#endif
|
||||
#ifndef SESSION_INDEX
|
||||
#define SESSION_INDEX
|
||||
#endif
|
||||
#endif /* CYASSL_QL */
|
||||
|
||||
|
||||
#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \
|
||||
!defined(CYASSL_LEANPSK) && !defined(NO_CYASSL_MEMORY)
|
||||
#define USE_CYASSL_MEMORY
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS)
|
||||
#undef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
|
||||
|
||||
/* stream ciphers except arc4 need 32bit alignment, intel ok without */
|
||||
#ifndef XSTREAM_ALIGNMENT
|
||||
#if defined(__x86_64__) || defined(__ia64__) || defined(__i386__)
|
||||
#define NO_XSTREAM_ALIGNMENT
|
||||
#else
|
||||
#define XSTREAM_ALIGNMENT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* if using hardware crypto and have alignment requirements, specify the
|
||||
requirement here. The record header of SSL/TLS will prvent easy alignment.
|
||||
This hint tries to help as much as possible. */
|
||||
#ifndef CYASSL_GENERAL_ALIGNMENT
|
||||
#ifdef CYASSL_AESNI
|
||||
#define CYASSL_GENERAL_ALIGNMENT 16
|
||||
#elif defined(XSTREAM_ALIGNMENT)
|
||||
#define CYASSL_GENERAL_ALIGNMENT 4
|
||||
#else
|
||||
#define CYASSL_GENERAL_ALIGNMENT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CRL
|
||||
/* not widely supported yet */
|
||||
#undef NO_SKID
|
||||
#define NO_SKID
|
||||
#endif
|
||||
|
||||
/* Place any other flags or defines here */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* CTAO_CRYPT_SETTINGS_H */
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
/* #define SINGLE_THREADED or define RTOS option */
|
||||
#define WOLFSSL_CMSIS_RTOS
|
||||
|
||||
/* #define NO_FILESYSTEM or define Filesystem option */
|
||||
#define WOLFSSL_KEIL_FS
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
|
||||
/* #define WOLFSSL_USER_IO or use BSD incompatible TCP stack */
|
||||
#define WOLFSSL_KEIL_TCP_NET /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */
|
||||
|
||||
#define NO_DEV_RANDOM
|
||||
/* define your Rand gen for the operational use */
|
||||
#define WOLFSSL_GENSEED_FORTEST
|
||||
|
||||
#define USE_WOLFSSL_MEMORY
|
||||
#define WOLFSSL_MALLOC_CHECK
|
||||
|
||||
#define XVALIDATEDATE(d, f,t) (0)
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#define NO_WRITEV
|
||||
#define NO_MAIN_DRIVER
|
||||
#define WOLFSSL_MDK_SHELL
|
||||
|
|
@ -19,52 +19,33 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**** CyaSSL for KEIL-RL Configuration ****/
|
||||
|
||||
#define __CORTEX_M3__
|
||||
#define CYASSL_MDK_ARM
|
||||
#define NO_WRITEV
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_MAIN_DRIVER
|
||||
|
||||
|
||||
#define CYASSL_DER_LOAD
|
||||
#define HAVE_NULL_CIPHER
|
||||
|
||||
#define HAVE_KEIL_RTX
|
||||
#define CYASSL_CMSIS_RTOS
|
||||
#define CYASSL_KEIL_TCP_NET
|
||||
|
||||
|
||||
// <<< Use Configuration Wizard in Context Menu >>>
|
||||
// <h> Build Target: Simple Client
|
||||
// <s.15>Callee IP Address
|
||||
// <i> Default: "192.168.1.100"
|
||||
#define CYASSL_CALLEE_IP "192.168.11.3"
|
||||
#define WOLFSSL_CALLEE_IP "192.168.10.8"
|
||||
// <s.15>Callee Port Number
|
||||
// <i> Default: "443"
|
||||
#define CYASSL_CALLEE_PORT "443"
|
||||
#define WOLFSSL_CALLEE_PORT "11111"
|
||||
// <o>HTTP GET Option <0=> HTTP Get <1=> SSL/TLS Message
|
||||
#define MDK_CONF_HTTP_GET 0
|
||||
#if MDK_CONF_HTTP_GET == 0
|
||||
#define CYASSL_HTTP_GET "-g"
|
||||
#define CYASSL_HTTP_GET_COUNT 1
|
||||
#define WOLFSSL_HTTP_GET "-g"
|
||||
#define WOLFSSL_HTTP_GET_COUNT 1
|
||||
#elif MDK_CONF_HTTP_GET == 1
|
||||
#define CYASSL_HTTP_GET ""
|
||||
#define CYASSL_HTTP_GET_COUNT 0
|
||||
#define WOLFSSL_HTTP_GET ""
|
||||
#define WOLFSSL_HTTP_GET_COUNT 0
|
||||
#endif
|
||||
// <o>SSL/TLS Version <0=> SSL3 <1=> TLS 1.0 <2=> TLS 1.1 <3=> TLS 1.2
|
||||
#define MDK_CONF_SSL_VERSION 3
|
||||
#if MDK_CONF_SSL_VERSION == 0
|
||||
#define CYASSL_SSL_VER "0"
|
||||
#define WOLFSSL_SSL_VER "0"
|
||||
#elif MDK_CONF_SSL_VERSION == 1
|
||||
#define CYASSL_SSL_VER "1"
|
||||
#define WOLFSSL_SSL_VER "1"
|
||||
#elif MDK_CONF_SSL_VERSION == 2
|
||||
#define CYASSL_SSL_VER "2"
|
||||
#define WOLFSSL_SSL_VER "2"
|
||||
#elif MDK_CONF_SSL_VERSION == 3
|
||||
#define CYASSL_SSL_VER "3"
|
||||
#define WOLFSSL_SSL_VER "3"
|
||||
#endif
|
||||
|
||||
// </h>
|
||||
|
|
|
@ -18,53 +18,51 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <cyassl/ctaocrypt/visibility.h>
|
||||
#include <cyassl/ctaocrypt/logging.h>
|
||||
#include <wolfssl/wolfcrypt/visibility.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_fs.h"
|
||||
#include "rl_net.h"
|
||||
#include <stdio.h>
|
||||
#include "cyassl_MDK_ARM.h"
|
||||
#include <cyassl/ssl.h>
|
||||
|
||||
#include <wolfssl/ssl.h>
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Initialize Clock Configuration
|
||||
*----------------------------------------------------------------------------*/
|
||||
void SystemClock_Config(void) {
|
||||
#warning "write MPU specific System Clock Set up\n"
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Initialize a Flash Memory Card
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
#include "rl_fs.h"
|
||||
static void init_filesystem (void) {
|
||||
int32_t retv;
|
||||
int32_t retv;
|
||||
|
||||
retv = finit ("M0:");
|
||||
retv = finit ("M0:");
|
||||
if (retv == 0) {
|
||||
retv = fmount ("M0:");
|
||||
if (retv == 0) {
|
||||
retv = fmount ("M0:");
|
||||
if (retv == 0) {
|
||||
printf ("Drive M0 ready!\n");
|
||||
}
|
||||
else {
|
||||
printf ("Drive M0 mount failed!\n");
|
||||
}
|
||||
} else {
|
||||
printf ("Drive M0 initialization failed!\n");
|
||||
printf ("Drive M0 ready!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* TCP/IP tasks
|
||||
*----------------------------------------------------------------------------*/
|
||||
void tcp_poll (void const *arg)
|
||||
{
|
||||
CYASSL_MSG("TCP polling started.\n") ;
|
||||
while (1) {
|
||||
net_main ();
|
||||
osDelay(100) ;
|
||||
else {
|
||||
printf ("Drive M0 mount failed!\n");
|
||||
}
|
||||
}
|
||||
else {
|
||||
printf ("Drive M0 initialization failed!\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
|
@ -73,30 +71,27 @@ typedef struct func_args {
|
|||
|
||||
extern void client_test(func_args * args) ;
|
||||
|
||||
osThreadDef (tcp_poll, osPriorityHigh , 1, 0) ;
|
||||
/*-----------------------------------------------------------------------------
|
||||
* mian entry
|
||||
*----------------------------------------------------------------------------*/
|
||||
#include "config-SimpleClient.h"
|
||||
int myoptind = 0;
|
||||
char* myoptarg = NULL;
|
||||
|
||||
#include "config-SimpleClient.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
static char *argv[] =
|
||||
{ "client", "-h", CYASSL_CALLEE_IP, "-p", CYASSL_CALLEE_PORT,
|
||||
"-v", CYASSL_SSL_VER, CYASSL_HTTP_GET } ;
|
||||
{ "client", "-h", WOLFSSL_CALLEE_IP, "-p", WOLFSSL_CALLEE_PORT,
|
||||
"-v", WOLFSSL_SSL_VER, WOLFSSL_HTTP_GET } ;
|
||||
static func_args args =
|
||||
{ 7 + CYASSL_HTTP_GET_COUNT, argv } ;
|
||||
|
||||
{ 7 + WOLFSSL_HTTP_GET_COUNT, argv } ;
|
||||
|
||||
SystemClock_Config ();
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
init_filesystem ();
|
||||
net_initialize() ;
|
||||
osThreadCreate (osThread (tcp_poll), NULL);
|
||||
osDelay(50000) ; /* wait for DHCP */
|
||||
#if defined(DEBUG_CYASSL)
|
||||
#endif
|
||||
netInitialize() ;
|
||||
osDelay(300) ;
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
printf("Turning ON Debug message\n") ;
|
||||
CyaSSL_Debugging_ON() ;
|
||||
wolfSSL_Debugging_ON() ;
|
||||
#endif
|
||||
|
||||
if(args.argc == 7)
|
||||
|
|
|
@ -481,6 +481,41 @@
|
|||
</Targets>
|
||||
|
||||
<RTE>
|
||||
<packages>
|
||||
<filter>
|
||||
<targetInfos/>
|
||||
</filter>
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="MDK-Network_DS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="0.10.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
</packages>
|
||||
<apis>
|
||||
<api Capiversion="2.01" Cclass="CMSIS Driver" Cgroup="Ethernet MAC" exclusive="0">
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0"/>
|
||||
|
@ -664,20 +699,20 @@
|
|||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="SimpleClient" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="SimpleClient" Cvendor="wolfSSL" Cversion="" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
|
@ -848,68 +883,68 @@
|
|||
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="6.4.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-Crypt.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-Crypt.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-Crypt.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-CyaSSL.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-CyaSSL.h</instance>
|
||||
<component Cclass="Other" Cgroup="CyaSSL" Csub="Core" Cvendor="wolfSSL" Cversion="2.7.0" condition="CyaSSL-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-wolfSSL.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-wolfSSL.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfSSL-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h">
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-RTX-TCP-FS.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-RTX-TCP-FS.h</instance>
|
||||
<component Cclass="Other" Cgroup="CyaSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="2.7.0" condition="CyaSSL-RTX,TCP,FS"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<component Cclass="Other" Cgroup="wolfSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfSSL-RTX,TCP,FS"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\Other\config.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-Crypt.h">
|
||||
<instance index="0">RTE\wolfSSL\config-Crypt.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-CyaSSL.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config-CyaSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="CyaSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.0.0" condition="CyaSSL-Core"/>
|
||||
<package license="cyassl\IDE\MDK5-ARM\Docs\CyaSSL-Licnese.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.0.0"/>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-wolfSSL.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config-wolfSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfSSL-Core"/>
|
||||
<package license="cyassl\IDE\MDK5-ARM\Docs\wolfSSL-Licnese.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-wolfSSL.h">
|
||||
<instance index="0">RTE\wolfSSL\config-wolfSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\wolfssl\wolfcrypt\settings.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.4." condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.4.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\user_settings.h">
|
||||
<instance index="0">RTE\wolfSSL\user_settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
|
|
|
@ -1,83 +0,0 @@
|
|||
/* time-STM32F2.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "time.h"
|
||||
|
||||
#define PERIPH_BASE ((uint32_t)0x40000000)
|
||||
/*-----------------------------------------------------------------------------
|
||||
* initialize RTC
|
||||
*----------------------------------------------------------------------------*/
|
||||
#include "stm32f2xx.h"
|
||||
|
||||
#define assert_param(a)
|
||||
|
||||
#if 0
|
||||
#define RTC_RSF_MASK ((uint32_t)0xFFFFFF5F)
|
||||
#define SYNCHRO_TIMEOUT ((uint32_t) 0x00008000)
|
||||
#define Bcd2ToByte(v) \
|
||||
((((uint8_t)(v & (uint8_t)0xF0) >> (uint8_t)0x4) * 10) + (v & (uint8_t)0x0F))
|
||||
#define RTC_TR_RESERVED_MASK ((uint32_t)0x007F7F7F)
|
||||
#define RTC_TR_MNT ((uint32_t)0x00007000)
|
||||
#define RTC_TR_MNU ((uint32_t)0x00000F00)
|
||||
|
||||
#define PWR_OFFSET (PWR_BASE - PERIPH_BASE)
|
||||
#define CR_OFFSET (PWR_OFFSET + 0x00)
|
||||
#define DBP_BitNumber 0x08
|
||||
#define CR_DBP_BB (PERIPH_BB_BASE + (CR_OFFSET * 32) + (DBP_BitNumber * 4))
|
||||
#define RTC_INIT_MASK ((uint32_t)0xFFFFFFFF)
|
||||
#define INITMODE_TIMEOUT ((uint32_t) 0x00010000)
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* initialize TIM
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define RCC_APB1Periph_TIM2 ((uint32_t)0x00000001)
|
||||
|
||||
void init_time(void)
|
||||
{
|
||||
uint16_t tmpcr1 = 0;
|
||||
|
||||
((uint32_t *)RCC)[0x10] |= RCC_APB1Periph_TIM2 ;
|
||||
|
||||
tmpcr1 = TIM2->CR1 ;
|
||||
tmpcr1 &= (uint16_t) (~(((uint16_t)0x0010) | ((uint16_t)0x0060) ));
|
||||
/* CR1 &= ~(TIM_CR1_DIR | TIM_CR1_CMS) */
|
||||
tmpcr1 |= (uint16_t)0x0000 ; /* CR1 |= TIM_CounterMode_Up */
|
||||
TIM2->CR1= tmpcr1 ;
|
||||
|
||||
TIM2->ARR = 0xffffffff ; /* ARR= TIM_Period */
|
||||
TIM2->PSC = 60 ; /* PSC = TIM_Prescaler */
|
||||
TIM2->EGR = ((uint16_t)0x0001) ; /* EGR = TIM_PSCReloadMode_Immediate */
|
||||
|
||||
*(uint16_t *)(PERIPH_BASE+0x0) |=((uint16_t)0x0001) ;
|
||||
/* TIM_Cmd(TIM2, ENABLE) ; */
|
||||
}
|
||||
|
||||
double current_time()
|
||||
{
|
||||
return ((double)TIM2->CNT/1000000.0) ;
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
/* time-dummy.c.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "time.h"
|
||||
|
||||
struct tm *Cyassl_MDK_gmtime(const time_t *c)
|
||||
{
|
||||
static struct tm date ;
|
||||
return(&date) ;
|
||||
}
|
||||
|
||||
time_t time(time_t * t) { return 0 ; }
|
|
@ -1,628 +0,0 @@
|
|||
/* settings.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
/* Place OS specific preprocessor flags, defines, includes here, will be
|
||||
included into every file because types.h includes it */
|
||||
|
||||
|
||||
#ifndef CTAO_CRYPT_SETTINGS_H
|
||||
#define CTAO_CRYPT_SETTINGS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Uncomment next line if using IPHONE */
|
||||
/* #define IPHONE */
|
||||
|
||||
/* Uncomment next line if using ThreadX */
|
||||
/* #define THREADX */
|
||||
|
||||
/* Uncomment next line if using Micrium ucOS */
|
||||
/* #define MICRIUM */
|
||||
|
||||
/* Uncomment next line if using Mbed */
|
||||
/* #define MBED */
|
||||
|
||||
/* Uncomment next line if using Microchip PIC32 ethernet starter kit */
|
||||
/* #define MICROCHIP_PIC32 */
|
||||
|
||||
/* Uncomment next line if using Microchip TCP/IP stack, version 5 */
|
||||
/* #define MICROCHIP_TCPIP_V5 */
|
||||
|
||||
/* Uncomment next line if using Microchip TCP/IP stack, version 6 or later */
|
||||
/* #define MICROCHIP_TCPIP */
|
||||
|
||||
/* Uncomment next line if using FreeRTOS */
|
||||
/* #define FREERTOS */
|
||||
|
||||
/* Uncomment next line if using FreeRTOS Windows Simulator */
|
||||
/* #define FREERTOS_WINSIM */
|
||||
|
||||
/* Uncomment next line if using RTIP */
|
||||
/* #define EBSNET */
|
||||
|
||||
/* Uncomment next line if using lwip */
|
||||
/* #define CYASSL_LWIP */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for a game console */
|
||||
/* #define CYASSL_GAME_BUILD */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for LSR */
|
||||
/* #define CYASSL_LSR */
|
||||
|
||||
/* Uncomment next line if building CyaSSL for Freescale MQX/RTCS/MFS */
|
||||
/* #define FREESCALE_MQX */
|
||||
|
||||
/* Uncomment next line if using STM32F2 */
|
||||
/* #define CYASSL_STM32F2 */
|
||||
|
||||
/* Uncomment next line if using Comverge settings */
|
||||
/* #define COMVERGE */
|
||||
|
||||
/* Uncomment next line if using QL SEP settings */
|
||||
/* #define CYASSL_QL */
|
||||
|
||||
|
||||
#include <cyassl/ctaocrypt/visibility.h>
|
||||
|
||||
#ifdef IPHONE
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef COMVERGE
|
||||
#define THREADX
|
||||
#define HAVE_NETX
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_FILESYSTEM
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define NO_RSA
|
||||
#define NO_SESSION_CACHE
|
||||
#define HAVE_ECC
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef THREADX
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETX
|
||||
#include "nx_api.h"
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_PIC32
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define SINGLE_THREADED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_FILESYSTEM
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_TCPIP_V5
|
||||
/* include timer functions */
|
||||
#include "TCPIP Stack/TCPIP.h"
|
||||
#endif
|
||||
|
||||
#ifdef MICROCHIP_TCPIP
|
||||
/* include timer, NTP functions */
|
||||
#include "system/system_services.h"
|
||||
#ifdef MICROCHIP_MPLAB_HARMONY
|
||||
#include "tcpip/tcpip.h"
|
||||
#else
|
||||
#include "tcpip/sntp.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MBED
|
||||
#define SINGLE_THREADED
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#endif /* MBED */
|
||||
|
||||
#ifdef CYASSL_TYTO
|
||||
#include "rand.h"
|
||||
#define FREERTOS
|
||||
#define NO_FILESYSTEM
|
||||
#define CYASSL_USER_IO
|
||||
#define NO_DEV_RANDOM
|
||||
#define HAVE_ECC
|
||||
#define HAVE_ECC_ENCRYPT
|
||||
#define ECC_SHAMIR
|
||||
#define HAVE_HKDF
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define FP_MAX_BITS 512
|
||||
#define NO_OLD_TLS
|
||||
#define NO_MD4
|
||||
#define NO_RABBIT
|
||||
#define NO_HC128
|
||||
#define NO_RSA
|
||||
#define NO_DSA
|
||||
#define NO_PWDBASED
|
||||
#define NO_PSK
|
||||
#endif
|
||||
|
||||
#ifdef FREERTOS_WINSIM
|
||||
#define FREERTOS
|
||||
#define USE_WINDOWS_API
|
||||
#endif
|
||||
|
||||
|
||||
/* Micrium will use Visual Studio for compilation but not the Win32 API */
|
||||
#if defined(_WIN32) && !defined(MICRIUM) && !defined(FREERTOS) \
|
||||
&& !defined(EBSNET)
|
||||
#define USE_WINDOWS_API
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CYASSL_LEANPSK) && !defined(XMALLOC_USER)
|
||||
#include <stdlib.h>
|
||||
#define XMALLOC(s, h, type) malloc((s))
|
||||
#define XFREE(p, h, type) free((p))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
#endif
|
||||
|
||||
#if defined(XMALLOC_USER) && defined(SSN_BUILDING_LIBYASSL)
|
||||
#undef XMALLOC
|
||||
#define XMALLOC yaXMALLOC
|
||||
#undef XFREE
|
||||
#define XFREE yaXFREE
|
||||
#undef XREALLOC
|
||||
#define XREALLOC yaXREALLOC
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FREERTOS
|
||||
#ifndef NO_WRITEV
|
||||
#define NO_WRITEV
|
||||
#endif
|
||||
#ifndef NO_SHA512
|
||||
#define NO_SHA512
|
||||
#endif
|
||||
#ifndef NO_DH
|
||||
#define NO_DH
|
||||
#endif
|
||||
#ifndef NO_DSA
|
||||
#define NO_DSA
|
||||
#endif
|
||||
#ifndef NO_HC128
|
||||
#define NO_HC128
|
||||
#endif
|
||||
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "FreeRTOS.h"
|
||||
#include "semphr.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef EBSNET
|
||||
#include "rtip.h"
|
||||
|
||||
/* #define DEBUG_CYASSL */
|
||||
#define NO_CYASSL_DIR /* tbd */
|
||||
|
||||
#if (POLLOS)
|
||||
#define SINGLE_THREADED
|
||||
#endif
|
||||
|
||||
#if (RTPLATFORM)
|
||||
#if (!RTP_LITTLE_ENDIAN)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#else
|
||||
#if (!KS_LITTLE_ENDIAN)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (WINMSP3)
|
||||
#undef SIZEOF_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#else
|
||||
#sslpro: settings.h - please implement SIZEOF_LONG and SIZEOF_LONG_LONG
|
||||
#endif
|
||||
|
||||
#define XMALLOC(s, h, type) ((void *)rtp_malloc((s), SSL_PRO_MALLOC))
|
||||
#define XFREE(p, h, type) (rtp_free(p))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
|
||||
#endif /* EBSNET */
|
||||
|
||||
#ifdef CYASSL_GAME_BUILD
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#if defined(__PPU) || defined(__XENON)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_LSR
|
||||
#define HAVE_WEBSERVER
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define CYASSL_LOW_MEMORY
|
||||
#define NO_WRITEV
|
||||
#define NO_SHA512
|
||||
#define NO_DH
|
||||
#define NO_DSA
|
||||
#define NO_HC128
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_RABBIT
|
||||
#ifndef NO_FILESYSTEM
|
||||
#define LSR_FS
|
||||
#include "inc/hw_types.h"
|
||||
#include "fs.h"
|
||||
#endif
|
||||
#define CYASSL_LWIP
|
||||
#include <errno.h> /* for tcp errno */
|
||||
#define CYASSL_SAFERTOS
|
||||
#if defined(__IAR_SYSTEMS_ICC__)
|
||||
/* enum uses enum */
|
||||
#pragma diag_suppress=Pa089
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_SAFERTOS
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "SafeRTOS/semphr.h"
|
||||
#endif
|
||||
|
||||
#include "SafeRTOS/heap.h"
|
||||
#define XMALLOC(s, h, type) pvPortMalloc((s))
|
||||
#define XFREE(p, h, type) vPortFree((p))
|
||||
#define XREALLOC(p, n, h, t) pvPortRealloc((p), (n))
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_LOW_MEMORY
|
||||
#undef RSA_LOW_MEM
|
||||
#define RSA_LOW_MEM
|
||||
#undef CYASSL_SMALL_STACK
|
||||
#define CYASSL_SMALL_STACK
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#ifdef FREESCALE_MQX
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_WRITEV
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_RABBIT
|
||||
#define NO_CYASSL_DIR
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#define FREESCALE_K70_RNGA
|
||||
/* #define FREESCALE_K53_RNGB */
|
||||
#include "mqx.h"
|
||||
#ifndef NO_FILESYSTEM
|
||||
#include "mfs.h"
|
||||
#include "fio.h"
|
||||
#endif
|
||||
#ifndef SINGLE_THREADED
|
||||
#include "mutex.h"
|
||||
#endif
|
||||
|
||||
#define XMALLOC(s, h, t) (void *)_mem_alloc_system((s))
|
||||
#define XFREE(p, h, t) {void* xp = (p); if ((xp)) _mem_free((xp));}
|
||||
/* Note: MQX has no realloc, using fastmath above */
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_STM32F2
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define NO_DEV_RANDOM
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_RABBIT
|
||||
#define STM32F2_RNG
|
||||
#define STM32F2_CRYPTO
|
||||
#define KEIL_INTRINSICS
|
||||
#endif
|
||||
|
||||
#ifdef MICRIUM
|
||||
|
||||
#include "stdlib.h"
|
||||
#include "net_cfg.h"
|
||||
#include "ssl_cfg.h"
|
||||
#include "net_secure_os.h"
|
||||
|
||||
#define CYASSL_TYPES
|
||||
|
||||
typedef CPU_INT08U byte;
|
||||
typedef CPU_INT16U word16;
|
||||
typedef CPU_INT32U word32;
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_WORD_SIZE == CPU_WORD_SIZE_32)
|
||||
#define SIZEOF_LONG 4
|
||||
#undef SIZEOF_LONG_LONG
|
||||
#else
|
||||
#undef SIZEOF_LONG
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#endif
|
||||
|
||||
#define STRING_USER
|
||||
|
||||
#define XSTRLEN(pstr) ((CPU_SIZE_T)Str_Len((CPU_CHAR *)(pstr)))
|
||||
#define XSTRNCPY(pstr_dest, pstr_src, len_max) \
|
||||
((CPU_CHAR *)Str_Copy_N((CPU_CHAR *)(pstr_dest), \
|
||||
(CPU_CHAR *)(pstr_src), (CPU_SIZE_T)(len_max)))
|
||||
#define XSTRNCMP(pstr_1, pstr_2, len_max) \
|
||||
((CPU_INT16S)Str_Cmp_N((CPU_CHAR *)(pstr_1), \
|
||||
(CPU_CHAR *)(pstr_2), (CPU_SIZE_T)(len_max)))
|
||||
#define XSTRSTR(pstr, pstr_srch) \
|
||||
((CPU_CHAR *)Str_Str((CPU_CHAR *)(pstr), \
|
||||
(CPU_CHAR *)(pstr_srch)))
|
||||
#define XMEMSET(pmem, data_val, size) \
|
||||
((void)Mem_Set((void *)(pmem), (CPU_INT08U) (data_val), \
|
||||
(CPU_SIZE_T)(size)))
|
||||
#define XMEMCPY(pdest, psrc, size) ((void)Mem_Copy((void *)(pdest), \
|
||||
(void *)(psrc), (CPU_SIZE_T)(size)))
|
||||
#define XMEMCMP(pmem_1, pmem_2, size) \
|
||||
(((CPU_BOOLEAN)Mem_Cmp((void *)(pmem_1), (void *)(pmem_2), \
|
||||
(CPU_SIZE_T)(size))) ? DEF_NO : DEF_YES)
|
||||
#define XMEMMOVE XMEMCPY
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_EN == DEF_ENABLED)
|
||||
#define MICRIUM_MALLOC
|
||||
#define XMALLOC(s, h, type) ((void *)NetSecure_BlkGet((CPU_INT08U)(type), \
|
||||
(CPU_SIZE_T)(s), (void *)0))
|
||||
#define XFREE(p, h, type) (NetSecure_BlkFree((CPU_INT08U)(type), \
|
||||
(p), (void *)0))
|
||||
#define XREALLOC(p, n, h, t) realloc((p), (n))
|
||||
#endif
|
||||
|
||||
#if (NET_SECURE_MGR_CFG_FS_EN == DEF_ENABLED)
|
||||
#undef NO_FILESYSTEM
|
||||
#else
|
||||
#define NO_FILESYSTEM
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_TRACE_LEVEL == CYASSL_TRACE_LEVEL_DBG)
|
||||
#define DEBUG_CYASSL
|
||||
#else
|
||||
#undef DEBUG_CYASSL
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_OPENSSL_EN == DEF_ENABLED)
|
||||
#define OPENSSL_EXTRA
|
||||
#else
|
||||
#undef OPENSSL_EXTRA
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_MULTI_THREAD_EN == DEF_ENABLED)
|
||||
#undef SINGLE_THREADED
|
||||
#else
|
||||
#define SINGLE_THREADED
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DH_EN == DEF_ENABLED)
|
||||
#undef NO_DH
|
||||
#else
|
||||
#define NO_DH
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DSA_EN == DEF_ENABLED)
|
||||
#undef NO_DSA
|
||||
#else
|
||||
#define NO_DSA
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_PSK_EN == DEF_ENABLED)
|
||||
#undef NO_PSK
|
||||
#else
|
||||
#define NO_PSK
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_3DES_EN == DEF_ENABLED)
|
||||
#undef NO_DES
|
||||
#else
|
||||
#define NO_DES
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_AES_EN == DEF_ENABLED)
|
||||
#undef NO_AES
|
||||
#else
|
||||
#define NO_AES
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_RC4_EN == DEF_ENABLED)
|
||||
#undef NO_RC4
|
||||
#else
|
||||
#define NO_RC4
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_RABBIT_EN == DEF_ENABLED)
|
||||
#undef NO_RABBIT
|
||||
#else
|
||||
#define NO_RABBIT
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_HC128_EN == DEF_ENABLED)
|
||||
#undef NO_HC128
|
||||
#else
|
||||
#define NO_HC128
|
||||
#endif
|
||||
|
||||
#if (CPU_CFG_ENDIAN_TYPE == CPU_ENDIAN_TYPE_BIG)
|
||||
#define BIG_ENDIAN_ORDER
|
||||
#else
|
||||
#undef BIG_ENDIAN_ORDER
|
||||
#define LITTLE_ENDIAN_ORDER
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_MD4_EN == DEF_ENABLED)
|
||||
#undef NO_MD4
|
||||
#else
|
||||
#define NO_MD4
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_WRITEV_EN == DEF_ENABLED)
|
||||
#undef NO_WRITEV
|
||||
#else
|
||||
#define NO_WRITEV
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_USER_RNG_SEED_EN == DEF_ENABLED)
|
||||
#define NO_DEV_RANDOM
|
||||
#else
|
||||
#undef NO_DEV_RANDOM
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_USER_IO_EN == DEF_ENABLED)
|
||||
#define CYASSL_USER_IO
|
||||
#else
|
||||
#undef CYASSL_USER_IO
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DYNAMIC_BUFFERS_EN == DEF_ENABLED)
|
||||
#undef LARGE_STATIC_BUFFERS
|
||||
#undef STATIC_CHUNKS_ONLY
|
||||
#else
|
||||
#define LARGE_STATIC_BUFFERS
|
||||
#define STATIC_CHUNKS_ONLY
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DER_LOAD_EN == DEF_ENABLED)
|
||||
#define CYASSL_DER_LOAD
|
||||
#else
|
||||
#undef CYASSL_DER_LOAD
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_DTLS_EN == DEF_ENABLED)
|
||||
#define CYASSL_DTLS
|
||||
#else
|
||||
#undef CYASSL_DTLS
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_CALLBACKS_EN == DEF_ENABLED)
|
||||
#define CYASSL_CALLBACKS
|
||||
#else
|
||||
#undef CYASSL_CALLBACKS
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_FAST_MATH_EN == DEF_ENABLED)
|
||||
#define USE_FAST_MATH
|
||||
#else
|
||||
#undef USE_FAST_MATH
|
||||
#endif
|
||||
|
||||
#if (SSL_CFG_TFM_TIMING_RESISTANT_EN == DEF_ENABLED)
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#else
|
||||
#undef TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
|
||||
#endif /* MICRIUM */
|
||||
|
||||
|
||||
#ifdef CYASSL_QL
|
||||
#ifndef CYASSL_SEP
|
||||
#define CYASSL_SEP
|
||||
#endif
|
||||
#ifndef OPENSSL_EXTRA
|
||||
#define OPENSSL_EXTRA
|
||||
#endif
|
||||
#ifndef SESSION_CERTS
|
||||
#define SESSION_CERTS
|
||||
#endif
|
||||
#ifndef HAVE_AESCCM
|
||||
#define HAVE_AESCCM
|
||||
#endif
|
||||
#ifndef ATOMIC_USER
|
||||
#define ATOMIC_USER
|
||||
#endif
|
||||
#ifndef CYASSL_DER_LOAD
|
||||
#define CYASSL_DER_LOAD
|
||||
#endif
|
||||
#ifndef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
#ifndef HAVE_ECC
|
||||
#define HAVE_ECC
|
||||
#endif
|
||||
#ifndef SESSION_INDEX
|
||||
#define SESSION_INDEX
|
||||
#endif
|
||||
#endif /* CYASSL_QL */
|
||||
|
||||
|
||||
#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \
|
||||
!defined(CYASSL_LEANPSK) && !defined(NO_CYASSL_MEMORY)
|
||||
#define USE_CYASSL_MEMORY
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS)
|
||||
#undef KEEP_PEER_CERT
|
||||
#define KEEP_PEER_CERT
|
||||
#endif
|
||||
|
||||
|
||||
/* stream ciphers except arc4 need 32bit alignment, intel ok without */
|
||||
#ifndef XSTREAM_ALIGNMENT
|
||||
#if defined(__x86_64__) || defined(__ia64__) || defined(__i386__)
|
||||
#define NO_XSTREAM_ALIGNMENT
|
||||
#else
|
||||
#define XSTREAM_ALIGNMENT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/* if using hardware crypto and have alignment requirements, specify the
|
||||
requirement here. The record header of SSL/TLS will prvent easy alignment.
|
||||
This hint tries to help as much as possible. */
|
||||
#ifndef CYASSL_GENERAL_ALIGNMENT
|
||||
#ifdef CYASSL_AESNI
|
||||
#define CYASSL_GENERAL_ALIGNMENT 16
|
||||
#elif defined(XSTREAM_ALIGNMENT)
|
||||
#define CYASSL_GENERAL_ALIGNMENT 4
|
||||
#else
|
||||
#define CYASSL_GENERAL_ALIGNMENT 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CRL
|
||||
/* not widely supported yet */
|
||||
#undef NO_SKID
|
||||
#define NO_SKID
|
||||
#endif
|
||||
|
||||
/* Place any other flags or defines here */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* CTAO_CRYPT_SETTINGS_H */
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
/* #define SINGLE_THREADED or define RTOS option */
|
||||
#define WOLFSSL_CMSIS_RTOS
|
||||
|
||||
/* #define NO_FILESYSTEM or define Filesystem option */
|
||||
#define WOLFSSL_KEIL_FS
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
|
||||
/* #define WOLFSSL_USER_IO or use BSD incompatible TCP stack */
|
||||
#define WOLFSSL_KEIL_TCP_NET /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */
|
||||
|
||||
#define NO_DEV_RANDOM
|
||||
/* define your Rand gen for the operational use */
|
||||
#define WOLFSSL_GENSEED_FORTEST
|
||||
|
||||
#define USE_WOLFSSL_MEMORY
|
||||
#define WOLFSSL_MALLOC_CHECK
|
||||
|
||||
#define XVALIDATEDATE(d, f,t) (0)
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#define NO_WRITEV
|
||||
#define NO_MAIN_DRIVER
|
||||
#define WOLFSSL_MDK_SHELL
|
||||
|
|
@ -482,32 +482,32 @@
|
|||
</filter>
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash" versionMatchMode="fixed"/>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash" versionMatchMode="fixed"/>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash" versionMatchMode="fixed"/>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="MDK-Network_DS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="0.10.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash" versionMatchMode="fixed"/>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash" versionMatchMode="fixed"/>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash" versionMatchMode="fixed"/>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
</packages>
|
||||
|
@ -694,20 +694,20 @@
|
|||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="SimpleServer" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="SimpleServer" Cvendor="wolfSSL" Cversion="" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
|
@ -878,68 +878,68 @@
|
|||
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="6.4.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-Crypt.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-Crypt.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-Crypt.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-CyaSSL.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-CyaSSL.h</instance>
|
||||
<component Cclass="Other" Cgroup="CyaSSL" Csub="Core" Cvendor="wolfSSL" Cversion="2.7.0" condition="CyaSSL-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<file attr="config" category="header" name="wolfSSL\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-wolfSSL.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-wolfSSL.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfSSL-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h">
|
||||
<file attr="config" category="header" name="wolfSSL\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-RTX-TCP-FS.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-RTX-TCP-FS.h</instance>
|
||||
<component Cclass="Other" Cgroup="CyaSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="2.7.0" condition="CyaSSL-RTX,TCP,FS"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<component Cclass="Other" Cgroup="wolfSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfSSL-RTX,TCP,FS"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="wolfSSL\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\Other\config.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-Crypt.h">
|
||||
<instance index="0">RTE\wolfSSL\config-Crypt.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-CyaSSL.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config-CyaSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="CyaSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.0.0" condition="CyaSSL-Core"/>
|
||||
<package license="cyassl\IDE\MDK5-ARM\Docs\CyaSSL-Licnese.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.0.0"/>
|
||||
<file attr="config" category="header" name="wolfSSL\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-wolfSSL.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config-wolfSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfSSL-Core"/>
|
||||
<package license="wolfSSL\IDE\MDK5-ARM\Docs\wolfSSL-Licnese.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-wolfSSL.h">
|
||||
<instance index="0">RTE\wolfSSL\config-wolfSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="wolfSSL\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\wolfssl\wolfcrypt\settings.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.4." condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.4.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\user_settings.h">
|
||||
<instance index="0">RTE\wolfSSL\user_settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* config-RTX-TCP-FS.h
|
||||
/* SimpleServer.h
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
|
@ -20,13 +20,11 @@
|
|||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
// <<< Use Configuration Wizard in Context Menu >>>
|
||||
// <h> Build Target: Simple Server
|
||||
// <s.15>Listen Port Number
|
||||
// <i> Default: "11111"
|
||||
#define CYASSL_LISTEN_PORT "443"
|
||||
#define WOLFSSL_LISTEN_PORT "11111"
|
||||
|
||||
// </h>
|
||||
// <<< end of configuration section >>>
|
||||
|
|
|
@ -18,55 +18,51 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <cyassl/ctaocrypt/visibility.h>
|
||||
#include <cyassl/ctaocrypt/logging.h>
|
||||
#include <wolfssl/wolfcrypt/visibility.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
|
||||
#include "stm32f2xx_hal.h"
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_fs.h"
|
||||
#include "rl_net.h"
|
||||
#include <stdio.h>
|
||||
#include "cyassl_MDK_ARM.h"
|
||||
#include <cyassl/ssl.h>
|
||||
|
||||
#include "config-SimpleServer.h"
|
||||
#include <wolfssl/ssl.h>
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Initialize Clock Configuration
|
||||
*----------------------------------------------------------------------------*/
|
||||
void SystemClock_Config(void) {
|
||||
#warning "write MPU specific System Clock Set up\n"
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Initialize a Flash Memory Card
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
#include "rl_fs.h"
|
||||
static void init_filesystem (void) {
|
||||
int32_t retv;
|
||||
int32_t retv;
|
||||
|
||||
retv = finit ("M0:");
|
||||
retv = finit ("M0:");
|
||||
if (retv == 0) {
|
||||
retv = fmount ("M0:");
|
||||
if (retv == 0) {
|
||||
retv = fmount ("M0:");
|
||||
if (retv == 0) {
|
||||
printf ("Drive M0 ready!\n");
|
||||
}
|
||||
else {
|
||||
printf ("Drive M0 mount failed!\n");
|
||||
}
|
||||
} else {
|
||||
printf ("Drive M0 initialization failed!\n");
|
||||
printf ("Drive M0 ready!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* TCP/IP tasks
|
||||
*----------------------------------------------------------------------------*/
|
||||
void tcp_poll (void const *arg)
|
||||
{
|
||||
CYASSL_MSG("TCP polling started.\n") ;
|
||||
while (1) {
|
||||
net_main ();
|
||||
osDelay(1) ;
|
||||
else {
|
||||
printf ("Drive M0 mount failed!\n");
|
||||
}
|
||||
}
|
||||
else {
|
||||
printf ("Drive M0 initialization failed!\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
|
@ -74,9 +70,9 @@ typedef struct func_args {
|
|||
} func_args;
|
||||
|
||||
extern void server_test(func_args * args) ;
|
||||
extern void init_time(void) ;
|
||||
|
||||
osThreadDef (tcp_poll, osPriorityHigh , 1, 0) ;
|
||||
#include "config-SimpleServer.h"
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* mian entry
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
@ -85,22 +81,24 @@ char* myoptarg = NULL;
|
|||
|
||||
int main()
|
||||
{
|
||||
static char *argv[] = { "server", "-p", CYASSL_LISTEN_PORT, "-d"} ;
|
||||
static char *argv[] = { "server", "-p", WOLFSSL_LISTEN_PORT, "-d"} ;
|
||||
static func_args args = { 4, argv } ;
|
||||
|
||||
SystemClock_Config ();
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
init_filesystem ();
|
||||
net_initialize() ;
|
||||
osThreadCreate (osThread (tcp_poll), NULL);
|
||||
osDelay(10000) ; /* wait for DHCP */
|
||||
#if defined(DEBUG_CYASSL)
|
||||
printf("Turning ON Debug message\n") ;
|
||||
CyaSSL_Debugging_ON() ;
|
||||
#endif
|
||||
|
||||
netInitialize() ;
|
||||
osDelay(300) ;
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
printf("Turning ON Debug message\n") ;
|
||||
wolfSSL_Debugging_ON() ;
|
||||
#endif
|
||||
|
||||
printf("Simple Server: Started\n") ;
|
||||
while(1) {
|
||||
server_test(&args) ;
|
||||
printf("Enter any key to iterate.\n") ;
|
||||
getchar() ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
/* time-dummy.c.c
|
||||
*
|
||||
* Copyright (C) 2006-2016 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL.
|
||||
*
|
||||
* wolfSSL is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* wolfSSL is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "time.h"
|
||||
|
||||
struct tm *Cyassl_MDK_gmtime(const time_t *c)
|
||||
{
|
||||
static struct tm date ;
|
||||
return(&date) ;
|
||||
}
|
||||
|
||||
time_t time(time_t * t) { return 0 ; }
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
/* #define SINGLE_THREADED or define RTOS option */
|
||||
#define WOLFSSL_CMSIS_RTOS
|
||||
|
||||
/* #define NO_FILESYSTEM or define Filesystem option */
|
||||
#define WOLFSSL_KEIL_FS
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
|
||||
/* #define WOLFSSL_USER_IO or use BSD incompatible TCP stack */
|
||||
#define WOLFSSL_KEIL_TCP_NET /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */
|
||||
|
||||
#define NO_DEV_RANDOM
|
||||
/* define your Rand gen for the operational use */
|
||||
#define WOLFSSL_GENSEED_FORTEST
|
||||
|
||||
#define USE_WOLFSSL_MEMORY
|
||||
#define WOLFSSL_MALLOC_CHECK
|
||||
|
||||
#define XVALIDATEDATE(d, f,t) (0)
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#define NO_WRITEV
|
||||
#define NO_MAIN_DRIVER
|
||||
#define WOLFSSL_MDK_SHELL
|
||||
|
|
@ -18,7 +18,6 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
|
@ -44,29 +43,7 @@
|
|||
* Initialize Clock Configuration
|
||||
*----------------------------------------------------------------------------*/
|
||||
void SystemClock_Config(void) {
|
||||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_ClkInitTypeDef RCC_ClkInitStruct;
|
||||
|
||||
/* Enable HSE Oscillator and activate PLL with HSE as source */
|
||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
|
||||
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
|
||||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
|
||||
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
|
||||
RCC_OscInitStruct.PLL.PLLM = 25;
|
||||
RCC_OscInitStruct.PLL.PLLN = 240;
|
||||
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
|
||||
RCC_OscInitStruct.PLL.PLLQ = 5;
|
||||
HAL_RCC_OscConfig(&RCC_OscInitStruct);
|
||||
|
||||
/* Select PLL as system clock source and configure the HCLK, PCLK1 and PCLK2
|
||||
clocks dividers */
|
||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_HCLK |
|
||||
RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
|
||||
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
||||
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
||||
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
|
||||
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
|
||||
HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3);
|
||||
#warning "write MPU specific System Clock Set up\n"
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
|
|
|
@ -481,6 +481,41 @@
|
|||
</Targets>
|
||||
|
||||
<RTE>
|
||||
<packages>
|
||||
<filter>
|
||||
<targetInfos/>
|
||||
</filter>
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="ARM_Compiler" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="1.0.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="MDK-Network_DS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="0.10.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
</packages>
|
||||
<apis>
|
||||
<api Capiversion="2.01" Cclass="CMSIS Driver" Cgroup="Ethernet MAC" exclusive="0">
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0"/>
|
||||
|
@ -664,50 +699,50 @@
|
|||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Benchmark" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Benchmark" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Test" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="Test" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="SimpleClient" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="SimpleClient" Cvendor="wolfSSL" Cversion="" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="SimpleServer" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="SimpleServer" Cvendor="wolfSSL" Cversion="" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="echoClient" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="echoClient" Cvendor="wolfSSL" Cversion="" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="echoServer" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="echoServer" Cvendor="wolfSSL" Cversion="" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
|
@ -878,68 +913,68 @@
|
|||
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="6.4.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-Crypt.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-Crypt.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-Crypt.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-CyaSSL.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-CyaSSL.h</instance>
|
||||
<component Cclass="Other" Cgroup="CyaSSL" Csub="Core" Cvendor="wolfSSL" Cversion="2.7.0" condition="CyaSSL-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-wolfSSL.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-wolfSSL.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfSSL-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-RTX-TCP-FS.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-RTX-TCP-FS.h</instance>
|
||||
<component Cclass="Other" Cgroup="CyaSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="2.7.0" condition="CyaSSL-RTX,TCP,FS"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<component Cclass="Other" Cgroup="wolfSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfSSL-RTX,TCP,FS"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\Other\config.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="2.7.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="2.7.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-Crypt.h">
|
||||
<instance index="0">RTE\wolfSSL\config-Crypt.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-CyaSSL.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config-CyaSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="CyaSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.0.0" condition="CyaSSL-Core"/>
|
||||
<package license="cyassl\IDE\MDK5-ARM\Docs\CyaSSL-Licnese.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.0.0"/>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-wolfSSL.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config-wolfSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-Licnese.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-wolfSSL.h">
|
||||
<instance index="0">RTE\wolfSSL\config-wolfSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\wolfssl\wolfcrypt\settings.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.4." condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.4.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\user_settings.h">
|
||||
<instance index="0">RTE\wolfSSL\user_settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="STM32F207 Flash"/>
|
||||
</targetInfos>
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
/* #define SINGLE_THREADED or define RTOS option */
|
||||
#define WOLFSSL_CMSIS_RTOS
|
||||
|
||||
/* #define NO_FILESYSTEM or define Filesystem option */
|
||||
#define WOLFSSL_KEIL_FS
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define WOLFSSL_NO_CURRDIR
|
||||
|
||||
/* #define WOLFSSL_USER_IO or use BSD incompatible TCP stack */
|
||||
#define WOLFSSL_KEIL_TCP_NET /* KEIL_TCP + wolfssl_MDL_ARM.c for BSD compatibility */
|
||||
|
||||
#define NO_DEV_RANDOM
|
||||
/* define your Rand gen for the operational use */
|
||||
#define WOLFSSL_GENSEED_FORTEST
|
||||
|
||||
#define USE_WOLFSSL_MEMORY
|
||||
#define WOLFSSL_MALLOC_CHECK
|
||||
|
||||
#define XVALIDATEDATE(d, f,t) (0)
|
||||
#define WOLFSSL_USER_CURRTIME /* for benchmark */
|
||||
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#define NO_WRITEV
|
||||
#define NO_MAIN_DRIVER
|
||||
#define WOLFSSL_MDK_SHELL
|
||||
|
|
@ -451,6 +451,36 @@
|
|||
</Targets>
|
||||
|
||||
<RTE>
|
||||
<packages>
|
||||
<filter>
|
||||
<targetInfos/>
|
||||
</filter>
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="wolfSSL-Lib"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="MDK-Middleware" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="7.0.0-beta">
|
||||
<targetInfos>
|
||||
<targetInfo name="wolfSSL-Lib"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="MDK-Network_DS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="Keil" version="0.10.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="wolfSSL-Lib"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package name="STM32F2xx_DFP" schemaVersion="1.3" url="http://www.keil.com/pack" vendor="Keil" version="2.2.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="wolfSSL-Lib"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0">
|
||||
<targetInfos>
|
||||
<targetInfo name="wolfSSL-Lib"/>
|
||||
</targetInfos>
|
||||
</package>
|
||||
</packages>
|
||||
<apis>
|
||||
<api Capiversion="2.01" Cclass="CMSIS Driver" Cgroup="Ethernet MAC" exclusive="0">
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="4.3.0"/>
|
||||
|
@ -592,14 +622,14 @@
|
|||
<targetInfo name="wolfSSL-Lib"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="" condition="wolfCrypt-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo includeInLib="1" name="wolfSSL-Lib" versionMatchMode=""/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="" condition="wolfSSL-Core">
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.2" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo includeInLib="1" name="wolfSSL-Lib" versionMatchMode=""/>
|
||||
</targetInfos>
|
||||
|
@ -716,62 +746,62 @@
|
|||
<package name="MDK-Middleware" url="http://www.keil.com/pack/" vendor="Keil" version="5.1.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-Crypt.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-Crypt.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-Crypt.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-FS.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-FS.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-FS.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config-RTX-TCP-FS.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config-RTX-TCP-FS.h">
|
||||
<instance index="0" removed="1">RTE\Other\config-RTX-TCP-FS.h</instance>
|
||||
<component Cclass="Other" Cgroup="CyaSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="3.0.0" condition="CyaSSL-RTX,TCP,FS"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cclass="Other" Cgroup="wolfSSL" Csub="RTX,TCP,FS" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfSSL-RTX,TCP,FS"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\Other\config.h</instance>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cclass="Other" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/keil/pack/" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-Crypt.h">
|
||||
<instance index="0">RTE\wolfSSL\config-Crypt.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.6" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.6"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="wolfSSL-Lib"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\config-wolfSSL.h">
|
||||
<instance index="0">RTE\wolfSSL\config-wolfSSL.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.3"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfSSL" Csub="Core" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfSSL-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="wolfSSL-Lib"/>
|
||||
</targetInfos>
|
||||
</file>
|
||||
<file attr="config" category="header" name="cyassl\IDE\MDK5-ARM\MDK-ARM\CyaSSL\config.h">
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\MDK-ARM\wolfSSL\config.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\config.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package name="CyaSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.0.0"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" cond9tion="wolfCrypt-Core"/>
|
||||
<package name="wolfSSL" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\cyassl\ctaocrypt\settings.h">
|
||||
<file attr="config" category="header" name="wolfssl\wolfssl\ctaocrypt\settings.h">
|
||||
<instance index="0" removed="1">RTE\wolfSSL\settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.0.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.0"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos/>
|
||||
</file>
|
||||
<file attr="config" category="header" name="wolfssl\IDE\MDK5-ARM\Conf\user_settings.h">
|
||||
<instance index="0">RTE\wolfSSL\user_settings.h</instance>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.6.3" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="CyaSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.6.3"/>
|
||||
<component Cbundle="wolfSSL" Cclass="wolfSSL" Cgroup="wolfCrypt" Csub="CORE" Cvendor="wolfSSL" Cversion="3.9.0" condition="wolfCrypt-Core"/>
|
||||
<package license="wolfssl\IDE\MDK5-ARM\Docs\wolfSSL-License.txt" name="wolfSSL" schemaVersion="1.0" url="http://www.wolfSSL.com/files/ide" vendor="wolfSSL" version="3.9.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="wolfSSL-Lib"/>
|
||||
</targetInfos>
|
||||
|
|
Loading…
Reference in New Issue