mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-07 21:20:53 +02:00
@@ -55,7 +55,9 @@ int sendchar (int c)
|
||||
int getkey (void)
|
||||
{
|
||||
int ch = SER_GetChar();
|
||||
|
||||
#if defined (HAVE_KEIL_RTX)
|
||||
os_itv_wait ();
|
||||
#endif
|
||||
if (ch < 0) {
|
||||
return 0;
|
||||
}
|
||||
@@ -250,7 +252,7 @@ char *_sys_command_string (char *cmd, int len)
|
||||
|
||||
void _sys_exit (int return_code)
|
||||
{
|
||||
#ifdef CYASSL_MDK_SHELL
|
||||
#ifdef WOLFSSL_MDK_SHELL
|
||||
return ;
|
||||
#else
|
||||
/* Endless loop. */
|
||||
@@ -24,5 +24,5 @@
|
||||
#endif
|
||||
|
||||
/* Define initial data for cert buffers */
|
||||
#include <cyassl/certs_test.h>
|
||||
#include <wolfssl/certs_test.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef CYASSL_CERT_DATA_H
|
||||
#define CYASSL_CERT_DATA_H
|
||||
#ifndef WOLFSSL_CERT_DATA_H
|
||||
#define WOLFSSL_CERT_DATA_H
|
||||
|
||||
#ifdef USE_CERT_BUFFERS_1024
|
||||
extern const unsigned char client_key_der_1024[] ;
|
||||
+17
-16
@@ -20,20 +20,21 @@
|
||||
*/
|
||||
|
||||
|
||||
/**** CyaSSL for KEIL-RL Configuration ****/
|
||||
/**** wolfSSL for KEIL-RL Configuration ****/
|
||||
|
||||
#define __CORTEX_M3__
|
||||
#define CYASSL_MDK_ARM
|
||||
#define WOLFSSL_MDK_ARM
|
||||
#define NO_WRITEV
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_MAIN_DRIVER
|
||||
#define NO_WOLFSSL_DIR
|
||||
//#define NO_MAIN_DRIVER
|
||||
|
||||
#define CYASSL_DER_LOAD
|
||||
#define WOLFSSL_DER_LOAD
|
||||
#define HAVE_NULL_CIPHER
|
||||
|
||||
#define SINGLE_THREADED
|
||||
#define NO_FILESYSTEM
|
||||
#define NO_TLS
|
||||
#define WOLFSSL_USER_IO
|
||||
|
||||
#define NO_ECHOSERVER
|
||||
#define NO_ECHOCLIENT
|
||||
@@ -48,10 +49,10 @@
|
||||
// <e>Command Shell
|
||||
#define MDK_CONF_SHELL 1
|
||||
#if MDK_CONF_SHELL == 1
|
||||
#define CYASSL_MDK_SHELL
|
||||
#define WOLFSSL_MDK_SHELL
|
||||
#endif
|
||||
// </e>
|
||||
// <h>CyaSSL Apps
|
||||
// <h>wolfSSL Apps
|
||||
// <h>Crypt/Cipher
|
||||
// <o>Cert Storage <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes)
|
||||
#define MDK_CONF_CERT_BUFF 1
|
||||
@@ -95,14 +96,14 @@
|
||||
// </h>
|
||||
|
||||
|
||||
// <h>CTaoCrypt Library
|
||||
// <h>wolfCrypt Library
|
||||
|
||||
// <h>MD5, SHA, SHA-256, AES, RC4, ASN, RSA
|
||||
// </h>
|
||||
// <e>MD2
|
||||
#define MDK_CONF_MD2 0
|
||||
#if MDK_CONF_MD2 == 1
|
||||
#define CYASSL_MD2
|
||||
#define WOLFSSL_MD2
|
||||
#endif
|
||||
// </e>
|
||||
// <e>MD4
|
||||
@@ -115,19 +116,19 @@
|
||||
// <i>This has to be with SHA512
|
||||
#define MDK_CONF_SHA384 0
|
||||
#if MDK_CONF_SHA384 == 1
|
||||
#define CYASSL_SHA384
|
||||
#define WOLFSSL_SHA384
|
||||
#endif
|
||||
// </e>
|
||||
// <e>SHA-512
|
||||
#define MDK_CONF_SHA512 0
|
||||
#if MDK_CONF_SHA512 == 1
|
||||
#define CYASSL_SHA512
|
||||
#define WOLFSSL_SHA512
|
||||
#endif
|
||||
// </e>
|
||||
// <e>RIPEMD
|
||||
#define MDK_CONF_RIPEMD 0
|
||||
#if MDK_CONF_RIPEMD == 1
|
||||
#define CYASSL_RIPEMD
|
||||
#define WOLFSSL_RIPEMD
|
||||
#endif
|
||||
// </e>
|
||||
// <e>HMAC
|
||||
@@ -169,7 +170,7 @@
|
||||
// </e>
|
||||
|
||||
// <e>DH
|
||||
// <i>need this for CYASSL_SERVER, OPENSSL_EXTRA
|
||||
// <i>need this for WOLFSSL_SERVER, OPENSSL_EXTRA
|
||||
#define MDK_CONF_DH 1
|
||||
#if MDK_CONF_DH == 0
|
||||
#define NO_DH
|
||||
@@ -233,13 +234,13 @@
|
||||
// <e>Debug Message
|
||||
#define MDK_CONF_DebugMessage 0
|
||||
#if MDK_CONF_DebugMessage == 1
|
||||
#define DEBUG_CYASSL
|
||||
#define DEBUG_WOLFSSL
|
||||
#endif
|
||||
// </e>
|
||||
// <e>Check malloc
|
||||
#define MDK_CONF_CheckMalloc 1
|
||||
#if MDK_CONF_CheckMalloc == 1
|
||||
#define CYASSL_MALLOC_CHECK
|
||||
#define WOLFSSL_MALLOC_CHECK
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
@@ -274,7 +275,7 @@
|
||||
// <e>Small Stack
|
||||
#define MDK_CONF_SmallStack 1
|
||||
#if MDK_CONF_SmallStack == 0
|
||||
#define NO_CYASSL_SMALL_STACK
|
||||
#define NO_WOLFSSL_SMALL_STACK
|
||||
#endif
|
||||
// </e>
|
||||
// <e>Use Fast Math
|
||||
@@ -20,16 +20,16 @@
|
||||
*/
|
||||
|
||||
|
||||
/**** CyaSSL for KEIL-RL Configuration ****/
|
||||
/**** wolfSSL for KEIL-RL Configuration ****/
|
||||
|
||||
#define __CORTEX_M3__
|
||||
#define CYASSL_KEIL_RL
|
||||
#define WOLFSSL_KEIL_RL
|
||||
#define NO_WRITEV
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define NO_MAIN_DRIVER
|
||||
#define WOLFSSL_USER_IO
|
||||
|
||||
|
||||
#define CYASSL_DER_LOAD
|
||||
#define WOLFSSL_DER_LOAD
|
||||
#define HAVE_NULL_CIPHER
|
||||
|
||||
#define SINGLE_THREADED
|
||||
@@ -47,10 +47,10 @@
|
||||
// <e>Command Shell
|
||||
#define MDK_CONF_SHELL 1
|
||||
#if MDK_CONF_SHELL == 1
|
||||
#define CYASSL_MDK_SHELL
|
||||
#define WOLFSSL_MDK_SHELL
|
||||
#endif
|
||||
// </e>
|
||||
// <h>CyaSSL Apps
|
||||
// <h>wolfSSL Apps
|
||||
// <h>Crypt/Cipher
|
||||
// <o>Cert Storage <0=> SD Card <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes)
|
||||
#define MDK_CONF_CERT_BUFF 0
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
// </h>
|
||||
|
||||
// <h>CyaSSL Library
|
||||
// <h>wolfSSL Library
|
||||
// <h>SSL (Included by default)
|
||||
// </h>
|
||||
|
||||
@@ -106,19 +106,19 @@
|
||||
// <e>CertGen
|
||||
#define MDK_CONF_CERT_GEN 0
|
||||
#if MDK_CONF_CERT_GEN == 1
|
||||
#define CYASSL_CERT_GEN
|
||||
#define WOLFSSL_CERT_GEN
|
||||
#endif
|
||||
// </e>
|
||||
// <e>KeyGen
|
||||
#define MDK_CONF_KEY_GEN 0
|
||||
#if MDK_CONF_KEY_GEN == 1
|
||||
#define CYASSL_KEY_GEN
|
||||
#define WOLFSSL_KEY_GEN
|
||||
#endif
|
||||
// </e>
|
||||
// <e>CRL
|
||||
#define MDK_CONF_DER_LOAD 0
|
||||
#if MDK_CONF_DER_LOAD == 1
|
||||
#define CYASSL_DER_LOAD
|
||||
#define WOLFSSL_DER_LOAD
|
||||
#endif
|
||||
// </e>
|
||||
// <e>OpenSSL Extra
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
// </h>
|
||||
|
||||
// <h>CTaoCrypt Library
|
||||
// <h>wolfCrypt Library
|
||||
|
||||
// <h>MD5, SHA, SHA-256, AES, RC4, ASN, RSA
|
||||
// </h>
|
||||
@@ -140,7 +140,7 @@
|
||||
// <e>MD2
|
||||
#define MDK_CONF_MD2 0
|
||||
#if MDK_CONF_MD2 == 1
|
||||
#define CYASSL_MD2
|
||||
#define WOLFSSL_MD2
|
||||
#endif
|
||||
// </e>
|
||||
// <e>MD4
|
||||
@@ -153,19 +153,19 @@
|
||||
// <i>This has to be with SHA512
|
||||
#define MDK_CONF_SHA384 0
|
||||
#if MDK_CONF_SHA384 == 1
|
||||
#define CYASSL_SHA384
|
||||
#define WOLFSSL_SHA384
|
||||
#endif
|
||||
// </e>
|
||||
// <e>SHA-512
|
||||
#define MDK_CONF_SHA512 0
|
||||
#if MDK_CONF_SHA512 == 1
|
||||
#define CYASSL_SHA512
|
||||
#define WOLFSSL_SHA512
|
||||
#endif
|
||||
// </e>
|
||||
// <e>RIPEMD
|
||||
#define MDK_CONF_RIPEMD 0
|
||||
#if MDK_CONF_RIPEMD == 1
|
||||
#define CYASSL_RIPEMD
|
||||
#define WOLFSSL_RIPEMD
|
||||
#endif
|
||||
// </e>
|
||||
// <e>HMAC
|
||||
@@ -207,7 +207,7 @@
|
||||
// </e>
|
||||
|
||||
// <e>DH
|
||||
// <i>need this for CYASSL_SERVER, OPENSSL_EXTRA
|
||||
// <i>need this for WOLFSSL_SERVER, OPENSSL_EXTRA
|
||||
#define MDK_CONF_DH 1
|
||||
#if MDK_CONF_DH == 0
|
||||
#define NO_DH
|
||||
@@ -271,13 +271,13 @@
|
||||
// <e>Debug Message
|
||||
#define MDK_CONF_DebugMessage 0
|
||||
#if MDK_CONF_DebugMessage == 1
|
||||
#define DEBUG_CYASSL
|
||||
#define DEBUG_WOLFSSL
|
||||
#endif
|
||||
// </e>
|
||||
// <e>Check malloc
|
||||
#define MDK_CONF_CheckMalloc 1
|
||||
#if MDK_CONF_CheckMalloc == 1
|
||||
#define CYASSL_MALLOC_CHECK
|
||||
#define WOLFSSL_MALLOC_CHECK
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
// <e>Small Stack
|
||||
#define MDK_CONF_SmallStack 1
|
||||
#if MDK_CONF_SmallStack == 0
|
||||
#define NO_CYASSL_SMALL_STACK
|
||||
#define NO_WOLFSSL_SMALL_STACK
|
||||
#endif
|
||||
// </e>
|
||||
// <e>Use Fast Math
|
||||
+30
-28
@@ -20,20 +20,20 @@
|
||||
*/
|
||||
|
||||
|
||||
/**** CyaSSL for KEIL-RL Configuration ****/
|
||||
|
||||
/**** wolfSSL for MDK-RTX-TCP-FS Configuration ****/
|
||||
|
||||
#define __CORTEX_M3__
|
||||
#define CYASSL_MDK_ARM
|
||||
#define WOLFSSL_MDK_ARM
|
||||
#define NO_WRITEV
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define NO_MAIN_DRIVER
|
||||
|
||||
|
||||
#define CYASSL_DER_LOAD
|
||||
#define WOLFSSL_DER_LOAD
|
||||
#define HAVE_NULL_CIPHER
|
||||
|
||||
#define HAVE_KEIL_RTX
|
||||
#define CYASSL_KEIL_TCP_NET
|
||||
#define WOLFSSL_KEIL_TCP_NET
|
||||
|
||||
|
||||
// <<< Use Configuration Wizard in Context Menu >>>
|
||||
@@ -43,10 +43,10 @@
|
||||
// <e>Command Shell
|
||||
#define MDK_CONF_SHELL 1
|
||||
#if MDK_CONF_SHELL == 1
|
||||
#define CYASSL_MDK_SHELL
|
||||
#define WOLFSSL_MDK_SHELL
|
||||
#endif
|
||||
// </e>
|
||||
// <h>CyaSSL Apps
|
||||
// <h>wolfSSL Apps
|
||||
// <h>Crypt/Cipher
|
||||
// <o>Cert Storage <0=> SD Card <1=> Mem Buff (1024bytes) <2=> Mem Buff (2048bytes)
|
||||
#define MDK_CONF_CERT_BUFF 0
|
||||
@@ -115,7 +115,7 @@
|
||||
|
||||
// </h>
|
||||
|
||||
// <h>CyaSSL Library
|
||||
// <h>wolfSSL Library
|
||||
// <h>SSL (Included by default)
|
||||
// </h>
|
||||
|
||||
@@ -129,23 +129,23 @@
|
||||
// <e>CertGen
|
||||
#define MDK_CONF_CERT_GEN 0
|
||||
#if MDK_CONF_CERT_GEN == 1
|
||||
#define CYASSL_CERT_GEN
|
||||
#define WOLFSSL_CERT_GEN
|
||||
#endif
|
||||
// </e>
|
||||
// <e>KeyGen
|
||||
#define MDK_CONF_KEY_GEN 0
|
||||
#if MDK_CONF_KEY_GEN == 1
|
||||
#define CYASSL_KEY_GEN
|
||||
#define WOLFSSL_KEY_GEN
|
||||
#endif
|
||||
// </e>
|
||||
// <e>CRL
|
||||
#define MDK_CONF_DER_LOAD 0
|
||||
#if MDK_CONF_DER_LOAD == 1
|
||||
#define CYASSL_DER_LOAD
|
||||
#define WOLFSSL_DER_LOAD
|
||||
#endif
|
||||
// </e>
|
||||
// <e>OpenSSL Extra
|
||||
#define MDK_CONF_OPENSSL_EXTRA 1
|
||||
#define MDK_CONF_OPENSSL_EXTRA 0
|
||||
#if MDK_CONF_OPENSSL_EXTRA == 1
|
||||
#define OPENSSL_EXTRA
|
||||
#endif
|
||||
@@ -155,18 +155,18 @@
|
||||
|
||||
// </h>
|
||||
|
||||
// <h>CTaoCrypt Library
|
||||
// <h>wolfCrypt Library
|
||||
|
||||
// <h>MD5, SHA, SHA-256, AES, RC4, ASN, RSA
|
||||
// </h>
|
||||
// <e>MD2
|
||||
#define MDK_CONF_MD2 0
|
||||
#if MDK_CONF_MD2 == 1
|
||||
#define CYASSL_MD2
|
||||
#define WOLFSSL_MD2
|
||||
#endif
|
||||
// </e>
|
||||
// <e>MD4
|
||||
#define MDK_CONF_MD4 1
|
||||
#define MDK_CONF_MD4 0
|
||||
#if MDK_CONF_MD4 == 0
|
||||
#define NO_MD4
|
||||
#endif
|
||||
@@ -175,19 +175,19 @@
|
||||
// <i>This has to be with SHA512
|
||||
#define MDK_CONF_SHA384 0
|
||||
#if MDK_CONF_SHA384 == 1
|
||||
#define CYASSL_SHA384
|
||||
#define WOLFSSL_SHA384
|
||||
#endif
|
||||
// </e>
|
||||
// <e>SHA-512
|
||||
#define MDK_CONF_SHA512 0
|
||||
#if MDK_CONF_SHA512 == 1
|
||||
#define CYASSL_SHA512
|
||||
#define WOLFSSL_SHA512
|
||||
#endif
|
||||
// </e>
|
||||
// <e>RIPEMD
|
||||
#define MDK_CONF_RIPEMD 1
|
||||
#define MDK_CONF_RIPEMD 0
|
||||
#if MDK_CONF_RIPEMD == 1
|
||||
#define CYASSL_RIPEMD
|
||||
#define WOLFSSL_RIPEMD
|
||||
#endif
|
||||
// </e>
|
||||
// <e>HMAC
|
||||
@@ -216,7 +216,7 @@
|
||||
#endif
|
||||
// </e>
|
||||
// <e>DES3
|
||||
#define MDK_CONF_DES3 1
|
||||
#define MDK_CONF_DES3 0
|
||||
#if MDK_CONF_DES3 == 0
|
||||
#define NO_DES3
|
||||
#endif
|
||||
@@ -229,7 +229,7 @@
|
||||
// </e>
|
||||
|
||||
// <e>DH
|
||||
// <i>need this for CYASSL_SERVER, OPENSSL_EXTRA
|
||||
// <i>need this for WOLFSSL_SERVER, OPENSSL_EXTRA
|
||||
#define MDK_CONF_DH 1
|
||||
#if MDK_CONF_DH == 0
|
||||
#define NO_DH
|
||||
@@ -249,7 +249,7 @@
|
||||
// </e>
|
||||
|
||||
// <e>ECC
|
||||
#define MDK_CONF_ECC 1
|
||||
#define MDK_CONF_ECC 0
|
||||
#if MDK_CONF_ECC == 1
|
||||
#define HAVE_ECC
|
||||
#endif
|
||||
@@ -293,13 +293,13 @@
|
||||
// <e>Debug Message
|
||||
#define MDK_CONF_DEBUG_MSG 0
|
||||
#if MDK_CONF_DEBUG_MSG == 1
|
||||
#define DEBUG_CYASSL
|
||||
#define DEBUG_WOLFSSL
|
||||
#endif
|
||||
// </e>
|
||||
// <e>Check malloc
|
||||
#define MDK_CONF_CHECK_MALLOC 1
|
||||
#if MDK_CONF_CHECK_MALLOC == 1
|
||||
#define CYASSL_MALLOC_CHECK
|
||||
#define WOLFSSL_MALLOC_CHECK
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
@@ -325,7 +325,7 @@
|
||||
// </e>
|
||||
|
||||
// <e>Error Strings
|
||||
#define MDK_CONF_ErrorStrings 1
|
||||
#define MDK_CONF_ErrorStrings 0
|
||||
#if MDK_CONF_ErrorStrings == 0
|
||||
#define NO_ERROR_STRINGS
|
||||
#endif
|
||||
@@ -334,13 +334,14 @@
|
||||
// <e>Small Stack
|
||||
#define MDK_CONF_SMALL_STACK 1
|
||||
#if MDK_CONF_SMALL_STACK == 0
|
||||
#define NO_CYASSL_SMALL_STACK
|
||||
#define NO_WOLFSSL_SMALL_STACK
|
||||
#endif
|
||||
// </e>
|
||||
// <e>Use Fast Math
|
||||
#define MDK_CONF_FASTMATH 0
|
||||
#define MDK_CONF_FASTMATH 1
|
||||
#if MDK_CONF_FASTMATH == 1
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
#endif
|
||||
// </e>
|
||||
|
||||
@@ -349,3 +350,4 @@
|
||||
|
||||
//</h>
|
||||
// <<< end of configuration section >>>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
#define SINGLE_THREADED /* or define RTOS option */
|
||||
|
||||
#define WOLFSSL_USER_IO /* Use own TCP/IP lib */
|
||||
|
||||
#define NO_DEV_RANDOM
|
||||
#define WOLFSSL_MDK_ARM
|
||||
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define NO_WRITEV
|
||||
|
||||
#define USE_FAST_MATH
|
||||
#define TFM_TIMING_RESISTANT
|
||||
@@ -19,20 +19,26 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
/**** CyaSSL for KEIL-RL Configuration ****/
|
||||
#ifndef MDK_CONFIG_H__
|
||||
#define MDK_CONFIG_H__
|
||||
/**** wolfSSL for KEIL-RL Configuration ****/
|
||||
|
||||
#define __CORTEX_M3__
|
||||
#define CYASSL_MDK_ARM
|
||||
#define WOLFSSL_MDK_ARM
|
||||
|
||||
#define NO_WRITEV
|
||||
#define NO_CYASSL_DIR
|
||||
#define NO_WOLFSSL_DIR
|
||||
#define NO_MAIN_DRIVER
|
||||
|
||||
/* for Retarget.c */
|
||||
#define STDIO
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#define CYASSL_DER_LOAD
|
||||
#define WOLFSSL_DER_LOAD
|
||||
#define HAVE_NULL_CIPHER
|
||||
#define WOLFSSL_USER_TIME
|
||||
#define NO_TIME_H
|
||||
static int ValidateDate(const unsigned char* date, unsigned char format, int dateType){ return 1; }
|
||||
|
||||
#if defined(MDK_CONF_RTX_TCP_FS)
|
||||
#include "config-RTX-TCP-FS.h"
|
||||
@@ -42,5 +48,8 @@
|
||||
#include "config-FS.h"
|
||||
#elif defined(MDK_CONF_BARE_METAL)
|
||||
#include "config-BARE-METAL.h"
|
||||
#elif defined(MDK_WOLFLIB)
|
||||
#include "config-WOLFLIB.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -23,12 +23,12 @@
|
||||
#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 <RTL.h>
|
||||
#include <stdio.h>
|
||||
#include "cyassl_MDK_ARM.h"
|
||||
#include "wolfssl_MDK_ARM.h"
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* Initialize a Flash Memory Card
|
||||
@@ -53,11 +53,11 @@ static void init_card (void)
|
||||
/*-----------------------------------------------------------------------------
|
||||
* TCP/IP tasks
|
||||
*----------------------------------------------------------------------------*/
|
||||
#ifdef CYASSL_KEIL_TCP_NET
|
||||
#ifdef WOLFSSL_KEIL_TCP_NET
|
||||
__task void tcp_tick (void)
|
||||
{
|
||||
|
||||
CYASSL_MSG("Time tick started.") ;
|
||||
WOLFSSL_MSG("Time tick started.") ;
|
||||
#if defined (HAVE_KEIL_RTX)
|
||||
os_itv_set (10);
|
||||
#endif
|
||||
@@ -73,7 +73,7 @@ __task void tcp_tick (void)
|
||||
|
||||
__task void tcp_poll (void)
|
||||
{
|
||||
CYASSL_MSG("TCP polling started.\n") ;
|
||||
WOLFSSL_MSG("TCP polling started.\n") ;
|
||||
while (1) {
|
||||
main_TcpNet ();
|
||||
#if defined (HAVE_KEIL_RTX)
|
||||
@@ -83,13 +83,13 @@ __task void tcp_poll (void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_KEIL_RTX) && defined(CYASSL_MDK_SHELL)
|
||||
#if defined(HAVE_KEIL_RTX) && defined(WOLFSSL_MDK_SHELL)
|
||||
#define SHELL_STACKSIZE 1000
|
||||
static unsigned char Shell_stack[SHELL_STACKSIZE] ;
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(CYASSL_MDK_SHELL)
|
||||
#if defined(WOLFSSL_MDK_SHELL)
|
||||
extern void shell_main(void) ;
|
||||
#endif
|
||||
|
||||
@@ -104,14 +104,14 @@ extern void SER_Init(void) ;
|
||||
/*** This is the parent task entry ***/
|
||||
void main_task (void)
|
||||
{
|
||||
#ifdef CYASSL_KEIL_TCP_NET
|
||||
#ifdef WOLFSSL_KEIL_TCP_NET
|
||||
init_TcpNet ();
|
||||
|
||||
os_tsk_create (tcp_tick, 2);
|
||||
os_tsk_create (tcp_poll, 1);
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_MDK_SHELL
|
||||
#ifdef WOLFSSL_MDK_SHELL
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
os_tsk_create_user(shell_main, 1, Shell_stack, SHELL_STACKSIZE) ;
|
||||
#else
|
||||
@@ -127,7 +127,7 @@ void main_task (void)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
CYASSL_MSG("Terminating tcp_main\n") ;
|
||||
WOLFSSL_MSG("Terminating tcp_main\n") ;
|
||||
os_tsk_delete_self ();
|
||||
#endif
|
||||
|
||||
@@ -137,28 +137,24 @@ void main_task (void)
|
||||
int myoptind = 0;
|
||||
char* myoptarg = NULL;
|
||||
|
||||
#if defined(DEBUG_CYASSL)
|
||||
extern void CyaSSL_Debugging_ON(void) ;
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
extern void wolfSSL_Debugging_ON(void) ;
|
||||
#endif
|
||||
|
||||
|
||||
/*** main entry ***/
|
||||
extern void init_time(void) ;
|
||||
extern void SystemInit(void);
|
||||
|
||||
int main() {
|
||||
|
||||
SystemInit();
|
||||
SER_Init() ;
|
||||
#if !defined(NO_FILESYSTEM)
|
||||
init_card () ; /* initializing SD card */
|
||||
#endif
|
||||
|
||||
init_time() ;
|
||||
|
||||
#if defined(DEBUG_CYASSL)
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
printf("Turning ON Debug message\n") ;
|
||||
CyaSSL_Debugging_ON() ;
|
||||
wolfSSL_Debugging_ON() ;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
@@ -19,26 +19,26 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
/*** tiny Shell for CyaSSL apps ***/
|
||||
/*** tiny Shell for wolfSSL apps ***/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "cyassl/internal.h"
|
||||
#undef RNG
|
||||
#include <cyassl/ctaocrypt/logging.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
|
||||
#if defined(CYASSL_MDK_ARM)
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(WOLFSSL_MDK_ARM)
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <rtl.h>
|
||||
#include "cyassl_MDK_ARM.h"
|
||||
#include "wolfssl_MDK_ARM.h"
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_KEIL_NET
|
||||
#include "cyassl/test.h"
|
||||
#ifdef WOLFSSL_KEIL_NET
|
||||
#include "wolfassl/test.h"
|
||||
#else
|
||||
typedef struct func_args {
|
||||
int argc;
|
||||
@@ -66,7 +66,7 @@ typedef struct func_args {
|
||||
#define ctaocrypt_test command_not_found
|
||||
#endif
|
||||
|
||||
#ifndef CYASSL_KEIL_NET
|
||||
#ifndef WOLFSSL_KEIL_NET
|
||||
#define ipaddr_comm command_not_found
|
||||
#endif
|
||||
|
||||
@@ -75,7 +75,7 @@ typedef struct func_args {
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(DEBUG_CYASSL)
|
||||
#if !defined(DEBUG_WOLFSSL)
|
||||
#define dbg_comm command_not_found
|
||||
#endif
|
||||
|
||||
@@ -87,11 +87,11 @@ void command_not_found(void *argv) {
|
||||
extern void echoclient_test(void *args) ;
|
||||
extern void echoserver_test(void *args) ;
|
||||
extern void benchmark_test(void *args) ;
|
||||
extern void ctaocrypt_test(void *args) ;
|
||||
extern void wolfcrypt_test(void *args) ;
|
||||
extern void client_test(void *args) ;
|
||||
extern void server_test(void *args) ;
|
||||
extern void kill_task(void *args) ;
|
||||
extern void time_main(void *args) ;
|
||||
|
||||
extern void ipaddr_comm(void *args) ;
|
||||
extern void stack_comm(void *args) ;
|
||||
extern void for_command(void *args) ;
|
||||
@@ -103,7 +103,7 @@ extern void help_comm(void *arg) ;
|
||||
#ifndef NO_MD5
|
||||
extern void md5_test(void *arg) ;
|
||||
#endif
|
||||
#ifdef CYASSL_MD2
|
||||
#ifdef WOLFSSL_MD2
|
||||
extern void md2_test(void *arg) ;
|
||||
#endif
|
||||
#ifndef NO_MD4
|
||||
@@ -115,15 +115,15 @@ extern void sha_test(void *arg) ;
|
||||
#ifndef NO_SHA256
|
||||
extern void sha256_test(void *arg) ;
|
||||
#endif
|
||||
#ifdef CYASSL_SHA384
|
||||
#ifdef WOLFSSL_SHA384
|
||||
extern void sha384_test(void *arg) ;
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_SHA512
|
||||
#ifdef WOLFSSL_SHA512
|
||||
extern void sha512_test(void *arg) ;
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_RIPEMD
|
||||
#ifdef WOLFSSL_RIPEMD
|
||||
extern void ripemd_test(void *arg) ;
|
||||
#endif
|
||||
#ifndef NO_HMAC
|
||||
@@ -136,7 +136,7 @@ extern void hmac_sha_test(void *arg) ;
|
||||
extern void hmac_sha256_test(void *arg) ;
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_SHA384
|
||||
#ifdef WOLFSSL_SHA384
|
||||
extern void hmac_sha384_test(void *arg) ;
|
||||
#endif
|
||||
#endif
|
||||
@@ -206,10 +206,9 @@ static struct {
|
||||
"echoclient", echoclient_test,
|
||||
"echoserver", echoserver_test,
|
||||
"benchmark", benchmark_test,
|
||||
"test", ctaocrypt_test,
|
||||
"test", wolfcrypt_test,
|
||||
"client", client_test,
|
||||
"server", server_test,
|
||||
"time", time_main, /* get/set RTC: [-d yy/mm/dd] [-t hh:mm:ss]*/
|
||||
"ipaddr", ipaddr_comm, /* TBD */
|
||||
"stack", stack_comm, /* On/Off check stack size */
|
||||
"for", for_command, /* iterate next command X times */
|
||||
@@ -220,7 +219,7 @@ static struct {
|
||||
"ec", echoclient_test,
|
||||
"es", echoserver_test,
|
||||
"bm", benchmark_test,
|
||||
"te", ctaocrypt_test,
|
||||
"te", wolfcrypt_test,
|
||||
"cl", client_test,
|
||||
"sv", server_test,
|
||||
"ip", ipaddr_comm,
|
||||
@@ -233,7 +232,7 @@ static struct {
|
||||
#ifndef NO_MD5
|
||||
"md5", md5_test,
|
||||
#endif
|
||||
#ifdef CYASSL_MD2
|
||||
#ifdef WOLFSSL_MD2
|
||||
"md2", md2_test,
|
||||
#endif
|
||||
#ifndef NO_MD4
|
||||
@@ -243,13 +242,13 @@ static struct {
|
||||
#ifndef NO_SHA256
|
||||
"sha256", sha256_test,
|
||||
#endif
|
||||
#ifdef CYASSL_SHA384
|
||||
#ifdef WOLFSSL_SHA384
|
||||
"sha384", sha384_test,
|
||||
#endif
|
||||
#ifdef CYASSL_SHA512
|
||||
#ifdef WOLFSSL_SHA512
|
||||
"sha512", sha512_test,
|
||||
#endif
|
||||
#ifdef CYASSL_RIPEMD
|
||||
#ifdef WOLFSSL_RIPEMD
|
||||
"ripemd", ripemd_test,
|
||||
#endif
|
||||
#ifndef NO_HMAC
|
||||
@@ -260,7 +259,7 @@ static struct {
|
||||
#ifndef NO_SHA256
|
||||
"hmac_sha256", hmac_sha256_test,
|
||||
#endif
|
||||
#ifdef CYASSL_SHA384
|
||||
#ifdef WOLFSSL_SHA384
|
||||
"hmac_sha384", hmac_sha384_test,
|
||||
#endif
|
||||
#endif
|
||||
@@ -362,18 +361,18 @@ static int BackGround = 0 ; /* 1: background job is running */
|
||||
/************* Embedded Shell Commands **********************************/
|
||||
#define IP_SIZE 16
|
||||
|
||||
#ifdef CYASSL_KEIL_NET
|
||||
#ifdef WOLFSSL_KEIL_NET
|
||||
static void ipaddr_comm(void *args)
|
||||
{
|
||||
if(((func_args *)args)->argc == 1) {
|
||||
printf("IP addr: %s, port %d\n", yasslIP, yasslPort) ;
|
||||
printf("IP addr: %s, port %d\n", wolfSSLIP, wolfSSLPort) ;
|
||||
} else {
|
||||
if(BackGround != 0) {
|
||||
printf("Cannot change IP addr while background server is running\n") ;
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-'&&
|
||||
((func_args *)args)->argv[1][1] == 'a' ) {
|
||||
/* strcpy(yasslIP, ((func_args *)args)->argv[2]) ; */
|
||||
/* strcpy(wolfSSLIP, ((func_args *)args)->argv[2]) ; */
|
||||
} else if(((func_args *)args)->argc == 3 &&
|
||||
((func_args *)args)->argv[1][0] == '-' &&
|
||||
((func_args *)args)->argv[1][1] == 'p' ) {
|
||||
@@ -442,20 +441,20 @@ static void for_command(void *args)
|
||||
}
|
||||
|
||||
|
||||
#if defined(DEBUG_CYASSL)
|
||||
#if defined(DEBUG_WOLFSSL)
|
||||
|
||||
static int CyasslDebug = 1 ;
|
||||
static int wolfsslDebug = 1 ;
|
||||
|
||||
static void dbg_comm(void *args)
|
||||
{
|
||||
if(CyasslDebug == 1) {
|
||||
CyasslDebug = 0 ;
|
||||
if(wolfsslDebug == 1) {
|
||||
wolfsslDebug = 0 ;
|
||||
printf("Turning OFF Debug message\n") ;
|
||||
CyaSSL_Debugging_OFF() ;
|
||||
wolfSSL_Debugging_OFF() ;
|
||||
} else {
|
||||
CyasslDebug = 1 ;
|
||||
wolfsslDebug = 1 ;
|
||||
printf("Turning ON Debug message\n") ;
|
||||
CyaSSL_Debugging_ON() ;
|
||||
wolfSSL_Debugging_ON() ;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -467,20 +466,20 @@ static void help_comm(void *args)
|
||||
|
||||
|
||||
|
||||
#define BG_JOB_STACK_SIZE 12000
|
||||
#define BG_JOB_STACK_SIZE 16000
|
||||
#if (!defined(NO_SIMPLE_SERVER) && !defined(NO_ECHOSERVER)) && \
|
||||
defined(HAVE_KEIL_RTX)
|
||||
static char bg_job_stack[BG_JOB_STACK_SIZE] ;
|
||||
#endif
|
||||
|
||||
#define COMMAND_STACK_SIZE 12000
|
||||
#define COMMAND_STACK_SIZE 16000
|
||||
#if defined(HAVE_KEIL_RTX)
|
||||
static char command_stack[COMMAND_STACK_SIZE] ;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
static CyaSSL_Mutex command_mutex ;
|
||||
static wolfSSL_Mutex command_mutex ;
|
||||
#endif
|
||||
|
||||
/*********** Invoke Forground Command *********************/
|
||||
@@ -491,7 +490,7 @@ static void command_invoke(void *args)
|
||||
|
||||
func = (void(*)(void *))((func_args *)args)->argv[0] ;
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
LockMutex((CyaSSL_Mutex *)&command_mutex) ;
|
||||
LockMutex((wolfSSL_Mutex *)&command_mutex) ;
|
||||
#endif
|
||||
iteration = for_iteration ;
|
||||
for(i=0; i< iteration; i++) {
|
||||
@@ -509,7 +508,7 @@ static void command_invoke(void *args)
|
||||
if(iteration > 1)
|
||||
for_iteration = 1 ;
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
UnLockMutex((CyaSSL_Mutex *)&command_mutex) ;
|
||||
UnLockMutex((wolfSSL_Mutex *)&command_mutex) ;
|
||||
os_tsk_delete_self() ;
|
||||
#endif
|
||||
}
|
||||
@@ -525,7 +524,7 @@ static void bg_job_invoke(void *args)
|
||||
func = (void(*)(void *))((func_args *)args)->argv[0] ;
|
||||
func(args) ; /* invoke command */
|
||||
stack_check(bg_job_stack, BG_JOB_STACK_SIZE) ;
|
||||
#ifdef CYASSL_KEIL_NET
|
||||
#ifdef WOLFSSL_KEIL_NET
|
||||
init_TcpNet ();
|
||||
#endif
|
||||
BackGround = 0 ;
|
||||
@@ -550,7 +549,6 @@ void shell_main(void) {
|
||||
#if defined(HAVE_KEIL_RTX)
|
||||
InitMutex(&command_mutex) ;
|
||||
#endif
|
||||
time_main(NULL) ;
|
||||
printf("Starting Shell\n") ;
|
||||
while(1) {
|
||||
if(getline(line, LINESIZE, &args, &bf_flg) > 0) {
|
||||
@@ -559,14 +557,14 @@ void shell_main(void) {
|
||||
args.argv[0] = (char *) commandTable[i].func ;
|
||||
if(bf_flg == FORGROUND) {
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
UnLockMutex((CyaSSL_Mutex *)&command_mutex) ;
|
||||
UnLockMutex((wolfSSL_Mutex *)&command_mutex) ;
|
||||
os_tsk_create_user_ex( (void(*)(void *))&command_invoke, 7,
|
||||
command_stack, COMMAND_STACK_SIZE, &args) ;
|
||||
#else
|
||||
command_invoke(&args) ;
|
||||
#endif
|
||||
#ifdef HAVE_KEIL_RTX
|
||||
LockMutex((CyaSSL_Mutex *)&command_mutex) ;
|
||||
LockMutex((wolfSSL_Mutex *)&command_mutex) ;
|
||||
#endif
|
||||
} else {
|
||||
#if (!defined(NO_SIMPLE_SERVER) && \
|
||||
+12
-24
@@ -1,4 +1,4 @@
|
||||
/* ssl-dummy.c
|
||||
/* time-STM32F2.c
|
||||
*
|
||||
* Copyright (C) 2006-2015 wolfSSL Inc.
|
||||
*
|
||||
@@ -18,36 +18,24 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <cyassl/ssl.h>
|
||||
#include <cyassl/internal.h>
|
||||
#include <cyassl/error-ssl.h>
|
||||
#include <cyassl/ctaocrypt/coding.h>
|
||||
|
||||
Signer* GetCA(void* vp, byte* hash)
|
||||
{
|
||||
Signer*s ;
|
||||
return s ;
|
||||
}
|
||||
|
||||
int CyaSSL_dtls(CYASSL* ssl)
|
||||
#include <stdint.h>
|
||||
#define DWT ((DWT_Type *) (0xE0001000UL) )
|
||||
typedef struct
|
||||
{
|
||||
return ssl->options.dtls;
|
||||
}
|
||||
uint32_t CTRL; /*!< Offset: 0x000 (R/W) Control Register */
|
||||
uint32_t CYCCNT; /*!< Offset: 0x004 (R/W) Cycle Count Register */
|
||||
} DWT_Type;
|
||||
|
||||
int CyaSSL_get_using_nonblock(CYASSL* ssl)
|
||||
{
|
||||
CYASSL_ENTER("CyaSSL_get_using_nonblock");
|
||||
CYASSL_LEAVE("CyaSSL_get_using_nonblock", ssl->options.usingNonblock);
|
||||
return ssl->options.usingNonblock;
|
||||
}
|
||||
extern uint32_t SystemCoreClock ;
|
||||
|
||||
Signer* GetCAByName(void* vp, byte* hash)
|
||||
double current_time(int reset)
|
||||
{
|
||||
Signer * ca ;
|
||||
return(ca) ;
|
||||
if(reset) DWT->CYCCNT = 0 ;
|
||||
return ((double)DWT->CYCCNT/SystemCoreClock) ;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/* time-dummy.c.c
|
||||
*
|
||||
* Copyright (C) 2006-2015 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of wolfSSL. (formerly known as CyaSSL)
|
||||
*
|
||||
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "time.h"
|
||||
|
||||
struct tm *wolfssl_MDK_gmtime(const time_t *c)
|
||||
{
|
||||
static struct tm date ;
|
||||
return(&date) ;
|
||||
}
|
||||
|
||||
time_t time(time_t * t) { return 0 ; }
|
||||
+53
-55
@@ -1,4 +1,4 @@
|
||||
/* cyassl_MDK_ARM.c
|
||||
/* wolfssl_KEIL_RL.c
|
||||
*
|
||||
* Copyright (C) 2006-2015 wolfSSL Inc.
|
||||
*
|
||||
@@ -27,22 +27,29 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#if defined (CYASSL_MDK5)
|
||||
#include "cmsis_os.h"
|
||||
#if defined(CYASSL_KEIL_TCP_NET)
|
||||
#include "rl_net.h"
|
||||
#endif
|
||||
#else
|
||||
#include <rtl.h>
|
||||
#include <wolfssl/wolfcrypt/settings.h>
|
||||
|
||||
#if defined(WOLFSSL_MDK_ARM)
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(WOLFSSL_MDK5)
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_fs.h"
|
||||
#include "rl_net.h"
|
||||
#else
|
||||
#include "rtl.h"
|
||||
#endif
|
||||
|
||||
#include "wolfssl_MDK_ARM.h"
|
||||
#endif
|
||||
|
||||
#include "cyassl_MDK_ARM.h"
|
||||
#include "wolfssl_MDK_ARM.h"
|
||||
|
||||
#include <cyassl/ctaocrypt/visibility.h>
|
||||
#include <cyassl/ctaocrypt/logging.h>
|
||||
#include <wolfssl/wolfcrypt/visibility.h>
|
||||
#include <wolfssl/wolfcrypt/logging.h>
|
||||
|
||||
#if defined (CYASSL_CMSIS_RTOS)
|
||||
#if defined (WOLFSSL_CMSIS_RTOS)
|
||||
#define os_dly_wait(t) osDelay(10*t)
|
||||
#endif
|
||||
|
||||
@@ -50,7 +57,7 @@
|
||||
/** KEIL-RL TCPnet ****/
|
||||
/** TCPnet BSD socket does not have following functions. **/
|
||||
|
||||
#if defined(CYASSL_KEIL_TCP_NET)
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
char *inet_ntoa(struct in_addr in)
|
||||
{
|
||||
#define NAMESIZE 16
|
||||
@@ -69,10 +76,10 @@ unsigned long inet_addr(const char *cp)
|
||||
|
||||
|
||||
/*** tcp_connect is actually associated with following syassl_tcp_connect. ***/
|
||||
int Cyassl_connect(int sd, const struct sockaddr* sa, int sz)
|
||||
int wolfssl_connect(int sd, const struct sockaddr* sa, int sz)
|
||||
{
|
||||
int ret = 0 ;
|
||||
#if defined(CYASSL_KEIL_TCP_NET)
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
|
||||
SOCKADDR_IN addr ;
|
||||
|
||||
@@ -83,100 +90,100 @@ int Cyassl_connect(int sd, const struct sockaddr* sa, int sz)
|
||||
ret = connect(sd, (SOCKADDR *)&addr, sizeof(addr)) ;
|
||||
os_dly_wait(50);
|
||||
} while(ret == SCK_EWOULDBLOCK) ;
|
||||
#ifdef DEBUG_CYASSL
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
{
|
||||
char msg[50] ;
|
||||
sprintf(msg, "BSD Connect return code: %d\n", ret) ;
|
||||
CYASSL_MSG(msg) ;
|
||||
WOLFSSL_MSG(msg) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CYASSL_KEIL_TCP_NET */
|
||||
#endif /* WOLFSSL_KEIL_TCP_NET */
|
||||
return(ret ) ;
|
||||
}
|
||||
|
||||
|
||||
int Cyassl_accept(int sd, struct sockaddr *addr, int *addrlen)
|
||||
int wolfssl_accept(int sd, struct sockaddr *addr, int *addrlen)
|
||||
{
|
||||
int ret = 0 ;
|
||||
|
||||
#if defined(CYASSL_KEIL_TCP_NET)
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
while(1) {
|
||||
#undef accept /* Go to KEIL TCPnet accept */
|
||||
ret = accept(sd, addr, addrlen) ;
|
||||
if(ret != SCK_EWOULDBLOCK) break ;
|
||||
os_dly_wait(1);
|
||||
}
|
||||
#ifdef DEBUG_CYASSL
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
{
|
||||
char msg[50] ;
|
||||
sprintf(msg, "BSD Accept return code: %d\n", ret) ;
|
||||
CYASSL_MSG(msg) ;
|
||||
WOLFSSL_MSG(msg) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CYASSL_KEIL_TCP_NET */
|
||||
#endif /* WOLFSSL_KEIL_TCP_NET */
|
||||
return(ret ) ;
|
||||
|
||||
}
|
||||
|
||||
int Cyassl_recv(int sd, void *buf, size_t len, int flags)
|
||||
int wolfssl_recv(int sd, void *buf, size_t len, int flags)
|
||||
{
|
||||
int ret = 0;
|
||||
#if defined(CYASSL_KEIL_TCP_NET)
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
while(1) {
|
||||
#undef recv /* Go to KEIL TCPnet recv */
|
||||
ret = recv(sd, buf, len, flags) ;
|
||||
if((ret != SCK_EWOULDBLOCK) &&( ret != SCK_ETIMEOUT)) break ;
|
||||
os_dly_wait(1);
|
||||
}
|
||||
#ifdef DEBUG_CYASSL
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
{
|
||||
char msg[50] ;
|
||||
sprintf(msg, "BSD Recv return code: %d\n", ret) ;
|
||||
CYASSL_MSG(msg) ;
|
||||
WOLFSSL_MSG(msg) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CYASSL_KEIL_TCP_NET */
|
||||
#endif /* WOLFSSL_KEIL_TCP_NET */
|
||||
return(ret ) ;
|
||||
}
|
||||
|
||||
int Cyassl_send(int sd, const void *buf, size_t len, int flags)
|
||||
int wolfssl_send(int sd, const void *buf, size_t len, int flags)
|
||||
{
|
||||
int ret = 0 ;
|
||||
|
||||
#if defined(CYASSL_KEIL_TCP_NET)
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
while(1) {
|
||||
#undef send /* Go to KEIL TCPnet send */
|
||||
ret = send(sd, buf, len, flags) ;
|
||||
if(ret != SCK_EWOULDBLOCK) break ;
|
||||
os_dly_wait(1);
|
||||
}
|
||||
#ifdef DEBUG_CYASSL
|
||||
#ifdef DEBUG_WOLFSSL
|
||||
{
|
||||
char msg[50] ;
|
||||
sprintf(msg, "BSD Send return code: %d\n", ret) ;
|
||||
CYASSL_MSG(msg) ;
|
||||
WOLFSSL_MSG(msg) ;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CYASSL_KEIL_TCP_NET */
|
||||
#endif /* WOLFSSL_KEIL_TCP_NET */
|
||||
return(ret) ;
|
||||
|
||||
}
|
||||
|
||||
#endif /* CYASSL_KEIL_TCP_NET */
|
||||
#endif /* WOLFSSL_KEIL_TCP_NET */
|
||||
|
||||
#if defined(CYASSL_KEIL_TCP_NET)
|
||||
void Cyassl_sleep(int t)
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
void wolfssl_sleep(int t)
|
||||
{
|
||||
#if defined(HAVE_KEIL_RTX)
|
||||
os_dly_wait(t/1000+1) ;
|
||||
#endif
|
||||
}
|
||||
|
||||
int Cyassl_tcp_select(int sd, int timeout)
|
||||
int wolfssl_tcp_select(int sd, int timeout)
|
||||
{
|
||||
|
||||
return 0 ;
|
||||
@@ -184,9 +191,7 @@ int Cyassl_tcp_select(int sd, int timeout)
|
||||
}
|
||||
#endif
|
||||
|
||||
extern int strlen(const char *s) ;
|
||||
|
||||
FILE * CyaSSL_fopen(const char *name, const char *openmode)
|
||||
FILE * wolfSSL_fopen(const char *name, const char *openmode)
|
||||
{
|
||||
int i ; FILE * ret ;
|
||||
#define PATHSIZE 100
|
||||
@@ -206,30 +211,23 @@ FILE * CyaSSL_fopen(const char *name, const char *openmode)
|
||||
return(ret) ;
|
||||
}
|
||||
|
||||
#if defined (CYASSL_MDK5)
|
||||
#define getkey getchar
|
||||
#define sendchar putchar
|
||||
#else
|
||||
extern int getkey(void) ;
|
||||
extern int sendchar(int c) ;
|
||||
#endif
|
||||
|
||||
char * Cyassl_fgets ( char * str, int num, FILE * f )
|
||||
char * wolfssl_fgets ( char * str, int num, FILE * f )
|
||||
{
|
||||
int i ;
|
||||
|
||||
for(i = 0 ; i< num ; i++) {
|
||||
while((str[i] = getkey()) == 0) {
|
||||
#if defined (HAVE_KEIL_RTX)
|
||||
#if !defined(CYASSL_CMSIS_RTOS)
|
||||
os_tsk_pass ();
|
||||
#else
|
||||
osThreadYield ();
|
||||
#endif
|
||||
#endif
|
||||
#if defined (HAVE_KEIL_RTX) && !defined(WOLFSSL_CMSIS_RTOS)
|
||||
os_tsk_pass ();
|
||||
#elif defined(WOLFSSL_CMSIS_RTOS)
|
||||
osThreadYield ();
|
||||
#endif
|
||||
}
|
||||
if(str[i] == '\n' || str[i] == '\012' || str[i] == '\015') {
|
||||
sendchar('\n') ;
|
||||
sendchar('\n') ;
|
||||
str[i++] = '\n' ;
|
||||
str[i] = '\0' ;
|
||||
break ;
|
||||
+31
-36
@@ -1,4 +1,4 @@
|
||||
/* cyassl_KEIL_RL.h
|
||||
/* wolfssl_KEIL_RL.h
|
||||
*
|
||||
* Copyright (C) 2006-2015 wolfSSL Inc.
|
||||
*
|
||||
@@ -22,16 +22,16 @@
|
||||
/******************************************************************************/
|
||||
/** This file is for defining types, values for specific to KEIL-MDK-ARM. **/
|
||||
/******************************************************************************/
|
||||
#ifndef CYASSL_KEIL_RL_H
|
||||
#define CYASSL_KEIL_RL_H
|
||||
#ifndef WOLFSSL_KEIL_RL_H
|
||||
#define WOLFSSL_KEIL_RL_H
|
||||
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Go to STDIN */
|
||||
#define fgets(buff, sz, fd) Cyassl_fgets(buff, sz, fd)
|
||||
extern char * Cyassl_fgets ( char * str, int num, FILE * f ) ;
|
||||
#define fgets(buff, sz, fd) wolfssl_fgets(buff, sz, fd)
|
||||
extern char * wolfssl_fgets ( char * str, int num, FILE * f ) ;
|
||||
|
||||
#define SOCKET_T int
|
||||
|
||||
@@ -43,7 +43,7 @@ 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_mask fds_bits[(FD_SETSIZE + NFDBITS - 1) / NFDBITS];
|
||||
} fd_set;
|
||||
|
||||
/*** #include <sys/types.h> ***/
|
||||
@@ -52,39 +52,37 @@ struct timeval {
|
||||
long tv_usec; /* microseconds */
|
||||
};
|
||||
|
||||
#if defined(WOLFSSL_KEIL_TCP_NET)
|
||||
|
||||
/*** #include <unistd.h> **/
|
||||
/*
|
||||
int select(int nfds, fd_set *readfds, fd_set *writefds,
|
||||
fd_set *exceptfds, const struct timeval *timeout);
|
||||
void FD_CLR(int fd, fd_set *set);
|
||||
int FD_ISSET(int fd, fd_set *set);
|
||||
void FD_SET(int fd, fd_set *set);
|
||||
void FD_ZERO(fd_set *set);
|
||||
*/
|
||||
#if defined(WOLFSSL_MDK5)
|
||||
#define SCK_EWOULDBLOCK BSD_ERROR_WOULDBLOCK
|
||||
#define SCK_ETIMEOUT BSD_ERROR_TIMEOUT
|
||||
#include "rl_net.h"
|
||||
#endif
|
||||
|
||||
typedef int socklen_t ;
|
||||
|
||||
/* for avoiding conflict with KEIL-TCPnet BSD socket */
|
||||
/* Bodies are in cyassl_KEIL_RL.c */
|
||||
#define connect Cyassl_connect
|
||||
#define accept Cyassl_accept
|
||||
#define recv Cyassl_recv
|
||||
#define send Cyassl_send
|
||||
#define sleep Cyassl_sleep
|
||||
/* Bodies are in wolfssl_KEIL_RL.c */
|
||||
#define connect(a,b,c) wolfssl_connect(a, (struct sockaddr* )(b), c)
|
||||
#define accept wolfssl_accept
|
||||
#define recv wolfssl_recv
|
||||
#define send wolfssl_send
|
||||
#define sleep wolfssl_sleep
|
||||
|
||||
/* for avoiding conflicting with KEIL-TCPnet TCP socket */
|
||||
/* Bodies are in test.h */
|
||||
#define tcp_connect Cyassl_tcp_connect
|
||||
#define tcp_socket Cyassl_tcp_soket
|
||||
#define tcp_listen Cyassl_tcp_listen
|
||||
#define tcp_select Cyassl_tcp_select
|
||||
#define tcp_connect wolfssl_tcp_connect
|
||||
#define tcp_socket wolfssl_tcp_soket
|
||||
#define tcp_listen wolfssl_tcp_listen
|
||||
#define tcp_select wolfssl_tcp_select
|
||||
|
||||
extern int Cyassl_connect(int sd, const struct sockaddr * sa, int sz) ;
|
||||
extern int Cyassl_accept(int sd, struct sockaddr *addr, socklen_t *addrlen);
|
||||
extern int Cyassl_recv(int sd, void *buf, size_t len, int flags);
|
||||
extern int Cyassl_send(int sd, const void *buf, size_t len, int flags);
|
||||
extern void Cyassl_sleep(int sec) ;
|
||||
extern int Cyassl_tcp_select(int sd, int timeout) ;
|
||||
extern int wolfssl_connect(int sd, const struct sockaddr* sa, int sz) ;
|
||||
extern int wolfssl_accept(int sd, struct sockaddr*addr, socklen_t *addrlen);
|
||||
extern int wolfssl_recv(int sd, void *buf, size_t len, int flags);
|
||||
extern int wolfssl_send(int sd, const void *buf, size_t len, int flags);
|
||||
extern void wolfssl_sleep(int sec) ;
|
||||
extern int wolfssl_tcp_select(int sd, int timeout) ;
|
||||
|
||||
/** KEIL-RL TCPnet ****/
|
||||
/* TCPnet BSD socket does not have following functions. */
|
||||
@@ -95,9 +93,6 @@ extern int setsockopt(int sockfd, int level, int optname,
|
||||
extern int select(int nfds, fd_set *readfds, fd_set *writefds,
|
||||
fd_set *exceptfds, const struct timeval *timeout);
|
||||
|
||||
/* CyaSSL MDK-ARM time functions */
|
||||
#include <time.h>
|
||||
struct tm *Cyassl_MDK_gmtime(const time_t *c) ;
|
||||
extern double current_time(void) ;
|
||||
#endif /* WOLFSSL_KEIL_TCP_NET */
|
||||
|
||||
#endif /* CYASSL_KEIL_RL_H */
|
||||
#endif /* WOLFSSL_KEIL_RL_H */
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+921
-1320
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
|
||||
Use appropriate config file for the target library.
|
||||
|
||||
Configfile files Target
|
||||
config-WOLFLIB.h: wolfSSL-Lib /* for general use wolfSSL library */
|
||||
config-BARE-METAL.h: MDK-BAREMETAL-Lib /* for linking with MDK-BAREMETAL target in MDK-ARM-STM32F2xx project */
|
||||
config-FS.h: MDK-FS-Lib /* for linking with MDK-FS target in MDK-ARM-STM32F2xx project */
|
||||
config-RTX-TCP-FS.h: MDK-RTX-TCP-FS-Lib /* for linking with MDK-RTX-TCP-FS target in MDK-ARM-STM32F2xx project */
|
||||
@@ -29,11 +29,11 @@
|
||||
#include <cyassl/ssl.h>
|
||||
#include <cyassl/openssl/ssl.h>
|
||||
|
||||
#if defined(CYASSL_MDK_ARM)
|
||||
#if defined(WOLFSSL_MDK_ARM)
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(CYASSL_MDK5)
|
||||
#if defined(WOLFSSL_MDK5)
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_fs.h"
|
||||
#include "rl_net.h"
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "rtl.h"
|
||||
#endif
|
||||
|
||||
#include "cyassl_MDK_ARM.h"
|
||||
#include "wolfssl_MDK_ARM.h"
|
||||
#endif
|
||||
|
||||
#include <cyassl/test.h>
|
||||
@@ -74,7 +74,7 @@ void echoclient_test(void* args)
|
||||
|
||||
((func_args*)args)->return_code = -1; /* error state */
|
||||
|
||||
#ifndef CYASSL_MDK_SHELL
|
||||
#ifndef WOLFSSL_MDK_SHELL
|
||||
argc = ((func_args*)args)->argc;
|
||||
argv = ((func_args*)args)->argv;
|
||||
#endif
|
||||
@@ -103,7 +103,7 @@ void echoclient_test(void* args)
|
||||
doPSK = 1;
|
||||
#endif
|
||||
|
||||
#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && !defined(CYASSL_MDK_SHELL)
|
||||
#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && !defined(WOLFSSL_MDK_SHELL)
|
||||
port = ((func_args*)args)->signal->port;
|
||||
#endif
|
||||
|
||||
@@ -157,7 +157,7 @@ void echoclient_test(void* args)
|
||||
SSL_CTX_set_default_passwd_cb(ctx, PasswordCallBack);
|
||||
#endif
|
||||
|
||||
#if defined(CYASSL_MDK_ARM)
|
||||
#if defined(WOLFSSL_MDK_ARM)
|
||||
CyaSSL_CTX_set_verify(ctx, SSL_VERIFY_NONE, 0);
|
||||
#endif
|
||||
|
||||
@@ -198,7 +198,7 @@ void echoclient_test(void* args)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifndef CYASSL_MDK_SHELL
|
||||
#ifndef WOLFSSL_MDK_SHELL
|
||||
while (sendSz) {
|
||||
int got;
|
||||
if ( (got = SSL_read(ssl, reply, sizeof(reply)-1)) > 0) {
|
||||
@@ -264,7 +264,7 @@ void echoclient_test(void* args)
|
||||
args.argv = argv;
|
||||
|
||||
CyaSSL_Init();
|
||||
#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL)
|
||||
#if defined(DEBUG_CYASSL) && !defined(WOLFSSL_MDK_SHELL)
|
||||
CyaSSL_Debugging_ON();
|
||||
#endif
|
||||
#ifndef CYASSL_TIRTOS
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
#include <cyassl/ctaocrypt/ecc.h> /* ecc_fp_free */
|
||||
#endif
|
||||
|
||||
#if defined(CYASSL_MDK_ARM)
|
||||
#if defined(WOLFSSL_MDK_ARM)
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(CYASSL_MDK5)
|
||||
#if defined(WOLFSSL_MDK5)
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_fs.h"
|
||||
#include "rl_net.h"
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "rtl.h"
|
||||
#endif
|
||||
|
||||
#include "cyassl_MDK_ARM.h"
|
||||
#include "wolfssl_MDK_ARM.h"
|
||||
#endif
|
||||
|
||||
#include <cyassl/ssl.h>
|
||||
@@ -83,7 +83,7 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args)
|
||||
int outCreated = 0;
|
||||
int shutDown = 0;
|
||||
int useAnyAddr = 0;
|
||||
word16 port = yasslPort;
|
||||
word16 port = wolfSSLPort;
|
||||
int argc = ((func_args*)args)->argc;
|
||||
char** argv = ((func_args*)args)->argv;
|
||||
|
||||
@@ -114,7 +114,7 @@ THREAD_RETURN CYASSL_THREAD echoserver_test(void* args)
|
||||
#endif
|
||||
|
||||
#if defined(NO_MAIN_DRIVER) && !defined(USE_WINDOWS_API) && \
|
||||
!defined(CYASSL_SNIFFER) && !defined(CYASSL_MDK_SHELL) && \
|
||||
!defined(CYASSL_SNIFFER) && !defined(WOLFSSL_MDK_SHELL) && \
|
||||
!defined(CYASSL_TIRTOS)
|
||||
port = 0;
|
||||
#endif
|
||||
|
||||
@@ -34,11 +34,11 @@
|
||||
#define WOLFSSL_TRACK_MEMORY
|
||||
#endif
|
||||
|
||||
#if defined(CYASSL_MDK_ARM)
|
||||
#if defined(WOLFSSL_MDK_ARM)
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(CYASSL_MDK5)
|
||||
#if defined(WOLFSSL_MDK5)
|
||||
#include "cmsis_os.h"
|
||||
#include "rl_fs.h"
|
||||
#include "rl_net.h"
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "rtl.h"
|
||||
#endif
|
||||
|
||||
#include "cyassl_MDK_ARM.h"
|
||||
#include "wolfssl_MDK_ARM.h"
|
||||
#endif
|
||||
#include <cyassl/openssl/ssl.h>
|
||||
#include <cyassl/test.h>
|
||||
@@ -179,7 +179,7 @@ THREAD_RETURN CYASSL_THREAD server_test(void* args)
|
||||
int version = SERVER_DEFAULT_VERSION;
|
||||
int doCliCertCheck = 1;
|
||||
int useAnyAddr = 0;
|
||||
word16 port = yasslPort;
|
||||
word16 port = wolfSSLPort;
|
||||
int usePsk = 0;
|
||||
int useAnon = 0;
|
||||
int doDTLS = 0;
|
||||
@@ -661,7 +661,7 @@ while (1) { /* allow resume option */
|
||||
if (SSL_write(ssl, msg, sizeof(msg)) != sizeof(msg))
|
||||
err_sys("SSL_write failed");
|
||||
|
||||
#if defined(CYASSL_MDK_SHELL) && defined(HAVE_MDK_RTX)
|
||||
#if defined(WOLFSSL_MDK_SHELL) && defined(HAVE_MDK_RTX)
|
||||
os_dly_wait(500) ;
|
||||
#elif defined (CYASSL_TIRTOS)
|
||||
Task_yield();
|
||||
@@ -731,7 +731,7 @@ while (1) { /* allow resume option */
|
||||
args.argv = argv;
|
||||
|
||||
CyaSSL_Init();
|
||||
#if defined(DEBUG_CYASSL) && !defined(CYASSL_MDK_SHELL)
|
||||
#if defined(DEBUG_CYASSL) && !defined(WOLFSSL_MDK_SHELL)
|
||||
CyaSSL_Debugging_ON();
|
||||
#endif
|
||||
if (CurrentDir("_build"))
|
||||
|
||||
@@ -105,19 +105,14 @@
|
||||
#if defined(USE_CERT_BUFFERS_1024) || defined(USE_CERT_BUFFERS_2048) \
|
||||
|| !defined(NO_DH)
|
||||
/* include test cert and key buffers for use with NO_FILESYSTEM */
|
||||
#if defined(WOLFSSL_MDK_ARM)
|
||||
#include "cert_data.h" /* use certs_test.c for initial data,
|
||||
so other commands can share the data. */
|
||||
#else
|
||||
#include <wolfssl/certs_test.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef HAVE_BLAKE2
|
||||
#include <wolfssl/wolfcrypt/blake2.h>
|
||||
void bench_blake2(void);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* 4996 warning to use MS extensions e.g., strcpy_s instead of strncpy */
|
||||
|
||||
+3
-14
@@ -113,19 +113,7 @@
|
||||
#define XTIME(t1) mqx_time((t1))
|
||||
#define XGMTIME(c, t) mqx_gmtime((c), (t))
|
||||
#define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t))
|
||||
#elif defined(WOLFSSL_MDK_ARM)
|
||||
#if defined(WOLFSSL_MDK5)
|
||||
#include "cmsis_os.h"
|
||||
#else
|
||||
#include <rtl.h>
|
||||
#endif
|
||||
#undef RNG
|
||||
#include "wolfssl_MDK_ARM.h"
|
||||
#undef RNG
|
||||
#define RNG wolfSSL_RNG /*for avoiding name conflict in "stm32f2xx.h" */
|
||||
#define XTIME(tl) (0)
|
||||
#define XGMTIME(c, t) wolfssl_MDK_gmtime((c))
|
||||
#define XVALIDATE_DATE(d, f, t) ValidateDate((d), (f), (t))
|
||||
|
||||
#elif defined(USER_TIME)
|
||||
/* user time, and gmtime compatible functions, there is a gmtime
|
||||
implementation here that WINCE uses, so really just need some ticks
|
||||
@@ -1456,7 +1444,8 @@ int wc_DsaKeyToDer(DsaKey* key, byte* output, word32 inLen)
|
||||
word32 seqSz, verSz, rawLen, intTotalLen = 0;
|
||||
word32 sizes[DSA_INTS];
|
||||
int i, j, outLen, ret = 0, lbit;
|
||||
|
||||
int err ;
|
||||
|
||||
byte seq[MAX_SEQ_SZ];
|
||||
byte ver[MAX_VERSION_SZ];
|
||||
byte* tmps[DSA_INTS];
|
||||
|
||||
@@ -99,13 +99,7 @@
|
||||
#if defined(USE_CERT_BUFFERS_1024) || defined(USE_CERT_BUFFERS_2048) \
|
||||
|| !defined(NO_DH)
|
||||
/* include test cert and key buffers for use with NO_FILESYSTEM */
|
||||
#if defined(WOLFSSL_MDK_ARM)
|
||||
#include "cert_data.h"
|
||||
/* use certs_test.c for initial data, so other
|
||||
commands can share the data. */
|
||||
#else
|
||||
#include <wolfssl/certs_test.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(WOLFSSL_MDK_ARM)
|
||||
|
||||
@@ -67,13 +67,6 @@ typedef struct OS_Seed {
|
||||
#endif
|
||||
} OS_Seed;
|
||||
|
||||
|
||||
#if defined(WOLFSSL_MDK_ARM)
|
||||
#undef RNG
|
||||
#define RNG wolfSSL_RNG /* for avoiding name conflict in "stm32f2xx.h" */
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(HAVE_HASHDRBG) || defined(NO_RC4)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user