Merge branch 'master' of github.com:cyassl/cyassl

This commit is contained in:
John Safranek 2014-10-23 14:08:11 -07:00
commit 62f0c9f661
6 changed files with 647 additions and 198 deletions

11
LICENSING Normal file
View 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.

View File

@ -56,6 +56,8 @@ EXTRA_DIST+= cyassl64.sln
EXTRA_DIST+= valgrind-error.sh
EXTRA_DIST+= gencertbuf.pl
EXTRA_DIST+= IDE
EXTRA_DIST+= README.md
EXTRA_DIST+= LICENSING
include cyassl/include.am
include certs/include.am

View File

@ -93,6 +93,12 @@
/* Uncomment next line if using TI-RTOS settings */
/* #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>
#ifdef IPHONE
@ -228,6 +234,27 @@
#define NO_MAIN_DRIVER
#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
#define FREERTOS
#define USE_WINDOWS_API

File diff suppressed because it is too large Load Diff

View File

@ -80,7 +80,8 @@
#include <unistd.h>
#endif
#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 <arpa/inet.h>
#include <netinet/in.h>
@ -153,6 +154,14 @@
#define SOCKET_ECONNREFUSED SCK_ERROR
#define SOCKET_ECONNABORTED SCK_ERROR
#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
#define SOCKET_EWOULDBLOCK EWOULDBLOCK
#define SOCKET_EAGAIN EAGAIN
@ -173,6 +182,9 @@
#elif defined(CYASSL_LWIP)
#define SEND_FUNCTION lwip_send
#define RECV_FUNCTION lwip_recv
#elif defined(CYASSL_PICOTCP)
#define SEND_FUNCTION pico_send
#define RECV_FUNCTION pico_recv
#else
#define SEND_FUNCTION send
#define RECV_FUNCTION recv

View File

@ -2149,7 +2149,7 @@ int TLSX_Parse(CYASSL* ssl, byte* input, word16 length, byte isRequest,
int ret = 0;
word16 offset = 0;
if (!ssl || !input || !suites)
if (!ssl || !input || (isRequest && !suites))
return BAD_FUNC_ARG;
while (ret == 0 && offset < length) {