mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
Merge branch 'master' of github.com:cyassl/cyassl
This commit is contained in:
11
LICENSING
Normal file
11
LICENSING
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
CyaSSL and wolfCrypt are either licensed for use under the GPLv2 or a
|
||||||
|
standard commercial license. For our users who cannot use CyaSSL under
|
||||||
|
GPLv2, a commercial license to CyaSSL and wolfCrypt is available.
|
||||||
|
Please contact wolfSSL Inc. directly at:
|
||||||
|
|
||||||
|
Email: licensing@wolfssl.com
|
||||||
|
Phone: +1 425 245-8247
|
||||||
|
|
||||||
|
More information can be found on the wolfSSL website at www.wolfssl.com.
|
||||||
|
|
@@ -56,6 +56,8 @@ EXTRA_DIST+= cyassl64.sln
|
|||||||
EXTRA_DIST+= valgrind-error.sh
|
EXTRA_DIST+= valgrind-error.sh
|
||||||
EXTRA_DIST+= gencertbuf.pl
|
EXTRA_DIST+= gencertbuf.pl
|
||||||
EXTRA_DIST+= IDE
|
EXTRA_DIST+= IDE
|
||||||
|
EXTRA_DIST+= README.md
|
||||||
|
EXTRA_DIST+= LICENSING
|
||||||
|
|
||||||
include cyassl/include.am
|
include cyassl/include.am
|
||||||
include certs/include.am
|
include certs/include.am
|
||||||
|
@@ -93,6 +93,12 @@
|
|||||||
/* Uncomment next line if using TI-RTOS settings */
|
/* Uncomment next line if using TI-RTOS settings */
|
||||||
/* #define CYASSL_TIRTOS */
|
/* #define CYASSL_TIRTOS */
|
||||||
|
|
||||||
|
/* Uncomment next line if building with PicoTCP */
|
||||||
|
/* #define CYASSL_PICOTCP */
|
||||||
|
|
||||||
|
/* Uncomment next line if building for PicoTCP demo bundle */
|
||||||
|
/* #define CYASSL_PICOTCP_DEMO */
|
||||||
|
|
||||||
#include <cyassl/ctaocrypt/visibility.h>
|
#include <cyassl/ctaocrypt/visibility.h>
|
||||||
|
|
||||||
#ifdef IPHONE
|
#ifdef IPHONE
|
||||||
@@ -228,6 +234,27 @@
|
|||||||
#define NO_MAIN_DRIVER
|
#define NO_MAIN_DRIVER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CYASSL_PICOTCP
|
||||||
|
#define errno pico_err
|
||||||
|
#include "pico_defines.h"
|
||||||
|
#include "pico_stack.h"
|
||||||
|
#include "pico_constants.h"
|
||||||
|
#define CUSTOM_RAND_GENERATE pico_rand
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CYASSL_PICOTCP_DEMO
|
||||||
|
#define CYASSL_STM32
|
||||||
|
#define USE_FAST_MATH
|
||||||
|
#define TFM_TIMING_RESISTANT
|
||||||
|
#define XMALLOC(s, h, type) PICO_ZALLOC((s))
|
||||||
|
#define XFREE(p, h, type) PICO_FREE((p))
|
||||||
|
#define SINGLE_THREADED
|
||||||
|
#define NO_WRITEV
|
||||||
|
#define CYASSL_USER_IO
|
||||||
|
#define NO_DEV_RANDOM
|
||||||
|
#define NO_FILESYSTEM
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef FREERTOS_WINSIM
|
#ifdef FREERTOS_WINSIM
|
||||||
#define FREERTOS
|
#define FREERTOS
|
||||||
#define USE_WINDOWS_API
|
#define USE_WINDOWS_API
|
||||||
|
743
src/internal.c
743
src/internal.c
File diff suppressed because it is too large
Load Diff
14
src/io.c
14
src/io.c
@@ -80,7 +80,8 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#if !(defined(DEVKITPRO) || defined(HAVE_RTP_SYS) || defined(EBSNET))
|
#if !(defined(DEVKITPRO) || defined(HAVE_RTP_SYS) || defined(EBSNET)) \
|
||||||
|
|| defined(CYASSL_PICOTCP)
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
@@ -153,6 +154,14 @@
|
|||||||
#define SOCKET_ECONNREFUSED SCK_ERROR
|
#define SOCKET_ECONNREFUSED SCK_ERROR
|
||||||
#define SOCKET_ECONNABORTED SCK_ERROR
|
#define SOCKET_ECONNABORTED SCK_ERROR
|
||||||
#endif
|
#endif
|
||||||
|
#elif defined(CYASSL_PICOTCP)
|
||||||
|
#define SOCKET_EWOULDBLOCK PICO_ERR_EAGAIN
|
||||||
|
#define SOCKET_EAGAIN PICO_ERR_EAGAIN
|
||||||
|
#define SOCKET_ECONNRESET PICO_ERR_ECONNRESET
|
||||||
|
#define SOCKET_EINTR PICO_ERR_EINTR
|
||||||
|
#define SOCKET_EPIPE PICO_ERR_EIO
|
||||||
|
#define SOCKET_ECONNREFUSED PICO_ERR_ECONNREFUSED
|
||||||
|
#define SOCKET_ECONNABORTED PICO_ERR_ESHUTDOWN
|
||||||
#else
|
#else
|
||||||
#define SOCKET_EWOULDBLOCK EWOULDBLOCK
|
#define SOCKET_EWOULDBLOCK EWOULDBLOCK
|
||||||
#define SOCKET_EAGAIN EAGAIN
|
#define SOCKET_EAGAIN EAGAIN
|
||||||
@@ -173,6 +182,9 @@
|
|||||||
#elif defined(CYASSL_LWIP)
|
#elif defined(CYASSL_LWIP)
|
||||||
#define SEND_FUNCTION lwip_send
|
#define SEND_FUNCTION lwip_send
|
||||||
#define RECV_FUNCTION lwip_recv
|
#define RECV_FUNCTION lwip_recv
|
||||||
|
#elif defined(CYASSL_PICOTCP)
|
||||||
|
#define SEND_FUNCTION pico_send
|
||||||
|
#define RECV_FUNCTION pico_recv
|
||||||
#else
|
#else
|
||||||
#define SEND_FUNCTION send
|
#define SEND_FUNCTION send
|
||||||
#define RECV_FUNCTION recv
|
#define RECV_FUNCTION recv
|
||||||
|
@@ -2149,7 +2149,7 @@ int TLSX_Parse(CYASSL* ssl, byte* input, word16 length, byte isRequest,
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
word16 offset = 0;
|
word16 offset = 0;
|
||||||
|
|
||||||
if (!ssl || !input || !suites)
|
if (!ssl || !input || (isRequest && !suites))
|
||||||
return BAD_FUNC_ARG;
|
return BAD_FUNC_ARG;
|
||||||
|
|
||||||
while (ret == 0 && offset < length) {
|
while (ret == 0 && offset < length) {
|
||||||
|
Reference in New Issue
Block a user