From c20b82925be3db9d6d238b0cdf47ff5914713a28 Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Fri, 9 Jan 2015 16:44:54 -0700 Subject: [PATCH] wolfssl Initial --- crypto/camellia/Makefile | 2 +- dtls/Makefile | 4 ++-- psk/Makefile | 2 +- tls/Makefile | 2 +- tls/client-tls-nonblocking.c | 1 + tls/server-callback.c | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/crypto/camellia/Makefile b/crypto/camellia/Makefile index 7e6f9fb3..fd28d252 100644 --- a/crypto/camellia/Makefile +++ b/crypto/camellia/Makefile @@ -1,6 +1,6 @@ CC=gcc CFLAGS=-Wall -LIBS= -lcyassl +LIBS= -lwolfssl camellia-encrypt: camellia-encrypt.o $(CC) -o $@ $^ $(CFLAGS) $(LIBS) diff --git a/dtls/Makefile b/dtls/Makefile index e182957e..80f3aa49 100644 --- a/dtls/Makefile +++ b/dtls/Makefile @@ -1,6 +1,6 @@ CC=gcc -CFLAGS=-Wall -DCYASSL_DTLS -LIBS=-lcyassl -lpthread +CFLAGS=-Wall -DWOLFSSL_DTLS +LIBS=-lwolfssl -lpthread all: client-udp client-dtls client-dtls-nonblocking client-dtls-resume server-udp server-dtls server-dtls-nonblocking server-dtls-threaded diff --git a/psk/Makefile b/psk/Makefile index 09483aac..852a22af 100644 --- a/psk/Makefile +++ b/psk/Makefile @@ -1,6 +1,6 @@ CC=gcc CFLAGS=-Wall -LIBS=-lcyassl +LIBS=-lwolfssl all: client-tcp client-psk client-psk-nonblocking client-psk-resume server-tcp server-psk server-psk-nonblocking server-psk-threaded diff --git a/tls/Makefile b/tls/Makefile index cfefd3f9..1367c53c 100644 --- a/tls/Makefile +++ b/tls/Makefile @@ -1,6 +1,6 @@ CC=gcc CFLAGS=-Wall -LIBS=-lcyassl +LIBS=-lwolfssl all: client-tcp client-tls client-tls-nonblocking client-tls-resume client-callback server-tcp server-tls server-tls-nonblocking server-tls-threaded server-callback diff --git a/tls/client-tls-nonblocking.c b/tls/client-tls-nonblocking.c index d845bdd3..0ea239d5 100644 --- a/tls/client-tls-nonblocking.c +++ b/tls/client-tls-nonblocking.c @@ -25,6 +25,7 @@ #include #include /* CyaSSL security library */ #include /* nonblocking I/O library */ +#include #define MAXDATASIZE 4096 /* maximum acceptable amount of data */ #define SERV_PORT 11111 /* define default port number */ diff --git a/tls/server-callback.c b/tls/server-callback.c index aa220e75..b506a807 100644 --- a/tls/server-callback.c +++ b/tls/server-callback.c @@ -179,7 +179,7 @@ int Server(word16 port) CyaSSL_SetIORecv(ctx, CbIORecv); CyaSSL_SetIOSend(ctx, CbIOSend); - tcp_accept(&listenfd, &connfd, NULL, port, 1, 0); + tcp_accept(&listenfd, &connfd, NULL, port, 1, 0, 0); if (connfd < 0) { err_sys("Fatal error : accept error");