From 2d3c607acdc0057e54513d5e4f7ed4ebf3ad4a7f Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Thu, 8 Jan 2015 15:33:44 -0700 Subject: [PATCH] handel poly1305 warning and clean up commented out compatibility layer includes --- src/internal.c | 3 --- src/keys.c | 3 ++- src/ssl.c | 3 --- wolfssl/internal.h | 4 ++-- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/internal.c b/src/internal.c index 3763d568a..fc85de4ba 100644 --- a/src/internal.c +++ b/src/internal.c @@ -19,9 +19,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ - /* Name change compatibility layer */ -//#include - #ifdef HAVE_CONFIG_H #include diff --git a/src/keys.c b/src/keys.c index f91fb9a77..380d188f0 100644 --- a/src/keys.c +++ b/src/keys.c @@ -2311,7 +2311,8 @@ static int SetAuthKeys(OneTimeAuth* authentication, Keys* keys, (Poly1305*)XMALLOC(sizeof(Poly1305), heap, DYNAMIC_TYPE_CIPHER); if (authentication && authentication->poly1305 == NULL) return MEMORY_E; - authentication->setup = 1; + if (authentication) + authentication->setup = 1; #endif (void)heap; (void)keys; diff --git a/src/ssl.c b/src/ssl.c index 8551a866a..31c801e16 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -19,9 +19,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ - /* Name change compatibility layer */ -//#include - #ifdef HAVE_CONFIG_H #include #endif diff --git a/wolfssl/internal.h b/wolfssl/internal.h index fd5ffe5d0..8f504cd0a 100644 --- a/wolfssl/internal.h +++ b/wolfssl/internal.h @@ -1598,7 +1598,7 @@ typedef struct Ciphers { #ifdef HAVE_CAMELLIA Camellia* cam; #endif -#ifdef HAVE_CHACHA +#ifdef HAVE_CHACHA ChaCha* chacha; #endif #ifdef HAVE_HC128 @@ -1614,7 +1614,7 @@ typedef struct Ciphers { #ifdef HAVE_ONE_TIME_AUTH /* Ciphers for one time authentication such as poly1305 */ typedef struct OneTimeAuth { -#ifdef HAVE_POLY1305 +#ifdef HAVE_POLY1305 Poly1305* poly1305; #endif byte setup; /* flag for if a cipher has been set */