mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 18:18:32 -04:00
Update CyaSSL to latest version.
This commit is contained in:
parent
5fcd270398
commit
3d007d0b4b
445 changed files with 162375 additions and 26182 deletions
39
FreeRTOS-Plus/Source/CyaSSL/IDE/MDK5-ARM/Inc/cert_data.h
Normal file
39
FreeRTOS-Plus/Source/CyaSSL/IDE/MDK5-ARM/Inc/cert_data.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
#ifndef CYASSL_CERT_DATA_H
|
||||
#define CYASSL_CERT_DATA_H
|
||||
|
||||
#ifdef USE_CERT_BUFFERS_1024
|
||||
extern const unsigned char client_key_der_1024[] ;
|
||||
extern int sizeof_client_key_der_1024 ;
|
||||
/* ./certs/1024/client-cert.der, 1024-bit */
|
||||
extern const unsigned char client_cert_der_1024[] ;
|
||||
extern int sizeof_client_cert_der_1024 ;
|
||||
/* ./certs/1024/dh1024.der, 1024-bit */
|
||||
extern const unsigned char dh_key_der_1024[] ;
|
||||
extern int sizeof_dh_key_der_1024 ;
|
||||
/* ./certs/1024/dsa1024.der, 1024-bit */
|
||||
extern const unsigned char dsa_key_der_1024[] ;
|
||||
extern int sizeof_dsa_key_der_1024 ;
|
||||
/* ./certs/1024/rsa1024.der, 1024-bit */
|
||||
extern const unsigned char rsa_key_der_1024[] ;
|
||||
extern int sizeof_rsa_key_der_1024 ;
|
||||
|
||||
#elif defined(USE_CERT_BUFFERS_2048)
|
||||
/* ./certs/client-key.der, 2048-bit */
|
||||
extern const unsigned char client_key_der_2048[] ;
|
||||
extern int sizeof_client_key_der_2048 ;
|
||||
/* ./certs/client-cert.der, 2048-bit */
|
||||
extern const unsigned char client_cert_der_2048[] ;
|
||||
extern int sizeof_client_cert_der_2048 ;
|
||||
/* ./certs/dh2048.der, 2048-bit */
|
||||
extern const unsigned char dh_key_der_2048[] ;
|
||||
extern int sizeof_dh_key_der_2048 ;
|
||||
/* ./certs/dsa2048.der, 2048-bit */
|
||||
extern const unsigned char dsa_key_der_2048[] ;
|
||||
extern int sizeof_dsa_key_der_2048;
|
||||
/* ./certs/rsa2048.der, 2048-bit */
|
||||
extern const unsigned char rsa_key_der_2048[] ;
|
||||
extern int sizeof_rsa_key_der_2048 ;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
62
FreeRTOS-Plus/Source/CyaSSL/IDE/MDK5-ARM/Inc/config.h
Normal file
62
FreeRTOS-Plus/Source/CyaSSL/IDE/MDK5-ARM/Inc/config.h
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* config.h
|
||||
*
|
||||
* Copyright (C) 2006-2013 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of CyaSSL.
|
||||
*
|
||||
* CyaSSL 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.
|
||||
*
|
||||
* CyaSSL 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
|
||||
*/
|
||||
|
||||
#define __CORTEX_M3__
|
||||
#define CYASSL_MDK_ARM
|
||||
#define CYASSL_MDK5
|
||||
#define CYASSL_CMSIS_RTOS
|
||||
|
||||
#define NO_WRITEV
|
||||
#define NO_CYASSL_DIR
|
||||
#define BENCH_EMBEDDED
|
||||
|
||||
#define CYASSL_DER_LOAD
|
||||
#define HAVE_NULL_CIPHER
|
||||
#define NO_MAIN_DRIVER
|
||||
|
||||
#if defined(MDK_CONF_CYASSL)
|
||||
#define CYASSL_MDK_SHELL
|
||||
#include "config-Crypt.h"
|
||||
#include "config-CyaSSL.h"
|
||||
#elif defined(MDK_CONF_SimpleClient)
|
||||
#include "config-Crypt.h"
|
||||
#include "config-CyaSSL.h"
|
||||
#elif defined(MDK_CONF_SimpleServer)
|
||||
#include "config-Crypt.h"
|
||||
#include "config-CyaSSL.h"
|
||||
#elif defined(MDK_CONF_EchoClient)
|
||||
#include "config-Crypt.h"
|
||||
#include "config-CyaSSL.h"
|
||||
#elif defined(MDK_CONF_EchoServer)
|
||||
#include "config-Crypt.h"
|
||||
#include "config-CyaSSL.h"
|
||||
#elif defined(MDK_CONF_Benchmark)
|
||||
#define SINGLE_THREADED
|
||||
#define NO_INLINE
|
||||
#include "config-Crypt.h"
|
||||
#elif defined(MDK_CONF_CryptTest)
|
||||
#define SINGLE_THREADED
|
||||
#define NO_INLINE
|
||||
#include "config-Crypt.h"
|
||||
|
||||
#endif
|
||||
|
||||
|
106
FreeRTOS-Plus/Source/CyaSSL/IDE/MDK5-ARM/Inc/cyassl_MDK_ARM.h
Normal file
106
FreeRTOS-Plus/Source/CyaSSL/IDE/MDK5-ARM/Inc/cyassl_MDK_ARM.h
Normal file
|
@ -0,0 +1,106 @@
|
|||
/* cyassl_KEIL_RL.h
|
||||
*
|
||||
* Copyright (C) 2006-2014 wolfSSL Inc.
|
||||
*
|
||||
* This file is part of CyaSSL.
|
||||
*
|
||||
* CyaSSL 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.
|
||||
*
|
||||
* CyaSSL 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-1301, USA
|
||||
*/
|
||||
|
||||
/******************************************************************************/
|
||||
/** This file is for defining types, values for specific to KEIL-MDK-ARM. **/
|
||||
/******************************************************************************/
|
||||
#ifndef CYASSL_KEIL_RL_H
|
||||
#define CYASSL_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 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(CYASSL_KEIL_TCP_NET)
|
||||
|
||||
|
||||
#if defined(CYASSL_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
|
||||
|
||||
/* 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
|
||||
|
||||
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) ;
|
||||
|
||||
/** 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 setsockopt(int sockfd, int level, int optname,
|
||||
const void *optval, socklen_t optlen);
|
||||
extern int select(int nfds, fd_set *readfds, fd_set *writefds,
|
||||
fd_set *exceptfds, const struct timeval *timeout);
|
||||
|
||||
#endif /* CYASSL_KEIL_TCP_NET */
|
||||
|
||||
|
||||
/* CyaSSL MDK-ARM time functions */
|
||||
#include <time.h>
|
||||
struct tm *Cyassl_MDK_gmtime(const time_t *c) ;
|
||||
extern double current_time(void) ;
|
||||
|
||||
#endif /* CYASSL_KEIL_RL_H */
|
Loading…
Add table
Add a link
Reference in a new issue