From 38e129fd24c20570977d3ed9e636fbbf72225ccd Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Wed, 31 Dec 2014 17:01:27 -0700 Subject: [PATCH] cleaning up some cyassl --- wolfcrypt/src/arc4.c | 2 +- wolfcrypt/src/blake2b.c | 2 +- wolfcrypt/src/camellia.c | 15 ++++++--------- wolfcrypt/src/coding.c | 20 ++++++++++---------- wolfcrypt/src/dsa.c | 10 +++++----- 5 files changed, 23 insertions(+), 26 deletions(-) diff --git a/wolfcrypt/src/arc4.c b/wolfcrypt/src/arc4.c index 1b078ee47..1721dfd0f 100644 --- a/wolfcrypt/src/arc4.c +++ b/wolfcrypt/src/arc4.c @@ -102,7 +102,7 @@ void wc_Arc4Process(Arc4* arc4, byte* out, const byte* in, word32 length) #ifdef HAVE_CAVIUM -#include +#include #include "cavium_common.h" /* Initiliaze Arc4 for use with Nitrox device */ diff --git a/wolfcrypt/src/blake2b.c b/wolfcrypt/src/blake2b.c index a1ef96739..58af31116 100644 --- a/wolfcrypt/src/blake2b.c +++ b/wolfcrypt/src/blake2b.c @@ -36,7 +36,7 @@ #include #endif -#include +#include #ifdef HAVE_BLAKE2 diff --git a/wolfcrypt/src/camellia.c b/wolfcrypt/src/camellia.c index 87ac1a5b9..b332fcfd5 100644 --- a/wolfcrypt/src/camellia.c +++ b/wolfcrypt/src/camellia.c @@ -56,22 +56,19 @@ #include #endif -#include +#include #ifdef HAVE_CAMELLIA -#include -#include -#include +#include +#include +#include #ifdef NO_INLINE - #include + #include #else - #include + #include #endif - - - /* u32 must be 32bit word */ typedef unsigned int u32; typedef unsigned char u8; diff --git a/wolfcrypt/src/coding.c b/wolfcrypt/src/coding.c index cdad0f5ca..cbd4e097a 100644 --- a/wolfcrypt/src/coding.c +++ b/wolfcrypt/src/coding.c @@ -23,13 +23,13 @@ #include #endif -#include +#include #ifndef NO_CODING -#include -#include -#include +#include +#include +#include enum { @@ -81,12 +81,12 @@ int Base64_Decode(const byte* in, word32 inLen, byte* out, word32* outLen) pad4 = 1; if (e1 < 0x2B || e2 < 0x2B || e3 < 0x2B || e4 < 0x2B) { - CYASSL_MSG("Bad Base64 Decode data, too small"); + WOLFSSL_MSG("Bad Base64 Decode data, too small"); return ASN_INPUT_E; } if (e1 > maxIdx || e2 > maxIdx || e3 > maxIdx || e4 > maxIdx) { - CYASSL_MSG("Bad Base64 Decode data, too big"); + WOLFSSL_MSG("Bad Base64 Decode data, too big"); return ASN_INPUT_E; } @@ -122,7 +122,7 @@ int Base64_Decode(const byte* in, word32 inLen, byte* out, word32* outLen) } } if (endLine != '\n') { - CYASSL_MSG("Bad end of line in Base64 Decode"); + WOLFSSL_MSG("Bad end of line in Base64 Decode"); return ASN_INPUT_E; } } @@ -133,7 +133,7 @@ int Base64_Decode(const byte* in, word32 inLen, byte* out, word32* outLen) } -#if defined(OPENSSL_EXTRA) || defined (SESSION_CERTS) || defined(CYASSL_KEY_GEN) || defined(CYASSL_CERT_GEN) || defined(HAVE_WEBSERVER) +#if defined(OPENSSL_EXTRA) || defined (SESSION_CERTS) || defined(WOLFSSL_KEY_GEN) || defined(CYASSL_CERT_GEN) || defined(HAVE_WEBSERVER) static const byte base64Encode[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', @@ -192,7 +192,7 @@ static int CEscape(int escaped, byte e, byte* out, word32* i, word32 max, /* check size */ if ( (idx+needed) > max) { - CYASSL_MSG("Escape buffer max too small"); + WOLFSSL_MSG("Escape buffer max too small"); return BUFFER_E; } @@ -324,7 +324,7 @@ int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out, word32* outLen) } -#endif /* defined(OPENSSL_EXTRA) || defined (SESSION_CERTS) || defined(CYASSL_KEY_GEN) || defined(CYASSL_CERT_GEN) || defined(HAVE_WEBSERVER) */ +#endif /* defined(OPENSSL_EXTRA) || defined (SESSION_CERTS) || defined(WOLFSSL_KEY_GEN) || defined(WOLFSSL_CERT_GEN) || defined(HAVE_WEBSERVER) */ #if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) || defined(HAVE_FIPS) diff --git a/wolfcrypt/src/dsa.c b/wolfcrypt/src/dsa.c index 7e1fbe5aa..e7cf5cf85 100644 --- a/wolfcrypt/src/dsa.c +++ b/wolfcrypt/src/dsa.c @@ -23,14 +23,14 @@ #include #endif -#include +#include #ifndef NO_DSA -#include -#include -#include -#include +#include +#include +#include +#include enum {