update to comment headers

This commit is contained in:
Jacob Barthelmeh
2015-01-05 09:48:43 -07:00
parent 966ca9c97e
commit accfaf17af
15 changed files with 93 additions and 107 deletions

View File

@@ -28,6 +28,14 @@
/* for fips compatibility @wc_fips */ /* for fips compatibility @wc_fips */
#ifndef HAVE_FIPS #ifndef HAVE_FIPS
#include <wolfssl/wolfcrypt/logging.h> #include <wolfssl/wolfcrypt/logging.h>
#define CYASSL_LEAVE WOLFSSL_LEAVE
#define CYASSL_ERROR WOLFSSL_ERROR
#define CYASSL_ENTER WOLFSSL_ENTER
#define CYASSL_MSG WOLFSSL_MSG
/* check old macros possibly declared */
#if defined(CYASSL_DEBUG) && !defined(DEBUG_WOLFSSL)
#define DEBUG_WOLFSSL
#endif
#else #else
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -30,7 +30,7 @@
/* inlining these functions is a huge speed increase and a small size decrease, /* inlining these functions is a huge speed increase and a small size decrease,
because the functions are smaller than function call setup/cleanup, e.g., because the functions are smaller than function call setup/cleanup, e.g.,
md5 benchmark is twice as fast with inline. If you don't want it, then md5 benchmark is twice as fast with inline. If you don't want it, then
define NO_INLINE and compile this file into cyassl, otherwise it's used as define NO_INLINE and compile this file into wolfssl, otherwise it's used as
a source header a source header
*/ */
@@ -148,7 +148,7 @@ STATIC INLINE void ByteReverseWords64(word64* out, const word64* in,
#endif /* WORD64_AVAILABLE */ #endif /* WORD64_AVAILABLE */
STATIC INLINE void XorWords(cyassl_word* r, const cyassl_word* a, word32 n) STATIC INLINE void XorWords(wolfssl_word* r, const wolfssl_word* a, word32 n)
{ {
word32 i; word32 i;
@@ -158,9 +158,9 @@ STATIC INLINE void XorWords(cyassl_word* r, const cyassl_word* a, word32 n)
STATIC INLINE void xorbuf(void* buf, const void* mask, word32 count) STATIC INLINE void xorbuf(void* buf, const void* mask, word32 count)
{ {
if (((cyassl_word)buf | (cyassl_word)mask | count) % CYASSL_WORD_SIZE == 0) if (((wolfssl_word)buf | (wolfssl_word)mask | count) % WOLFSSL_WORD_SIZE == 0)
XorWords( (cyassl_word*)buf, XorWords( (wolfssl_word*)buf,
(const cyassl_word*)mask, count / CYASSL_WORD_SIZE); (const wolfssl_word*)mask, count / WOLFSSL_WORD_SIZE);
else { else {
word32 i; word32 i;
byte* b = (byte*)buf; byte* b = (byte*)buf;

View File

@@ -406,7 +406,7 @@ int wc_ShaHash(const byte* data, word32 len, byte* hash)
#endif #endif
if ((ret = wc_InitSha(sha)) != 0) { if ((ret = wc_InitSha(sha)) != 0) {
CYASSL_MSG("wc_InitSha failed"); WOLFSSL_MSG("wc_InitSha failed");
} }
else { else {
wc_ShaUpdate(sha, data, len); wc_ShaUpdate(sha, data, len);

View File

@@ -14,14 +14,14 @@
* *
* Copyright (C) 2006-2014 wolfSSL Inc. * Copyright (C) 2006-2014 wolfSSL Inc.
* *
* This file is part of CyaSSL. * This file is part of wolfSSL. (formerly known as CyaSSL)
* *
* CyaSSL is free software; you can redistribute it and/or modify * wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* CyaSSL is distributed in the hope that it will be useful, * wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
@@ -32,10 +32,10 @@
*/ */
#ifndef CTAOCRYPT_BLAKE2_IMPL_H #ifndef WOLFCRYPT_BLAKE2_IMPL_H
#define CTAOCRYPT_BLAKE2_IMPL_H #define WOLFCRYPT_BLAKE2_IMPL_H
#include <cyassl/ctaocrypt/types.h> #include <wolfssl/wolfcrypt/types.h>
static inline word32 load32( const void *src ) static inline word32 load32( const void *src )
{ {
@@ -150,5 +150,5 @@ static inline void secure_zero_memory( void *v, word64 n )
while( n-- ) *p++ = 0; while( n-- ) *p++ = 0;
} }
#endif /* CTAOCRYPT_BLAKE2_IMPL_H */ #endif /* WOLFCRYPT_BLAKE2_IMPL_H */

View File

@@ -14,14 +14,14 @@
* *
* Copyright (C) 2006-2014 wolfSSL Inc. * Copyright (C) 2006-2014 wolfSSL Inc.
* *
* This file is part of CyaSSL. * This file is part of wolfSSL. (formerly known as CyaSSL)
* *
* CyaSSL is free software; you can redistribute it and/or modify * wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* CyaSSL is distributed in the hope that it will be useful, * wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
@@ -33,10 +33,10 @@
#ifndef CTAOCRYPT_BLAKE2_INT_H #ifndef WOLFCRYPT_BLAKE2_INT_H
#define CTAOCRYPT_BLAKE2_INT_H #define WOLFCRYPT_BLAKE2_INT_H
#include <cyassl/ctaocrypt/types.h> #include <wolfssl/wolfcrypt/types.h>
#if defined(_MSC_VER) #if defined(_MSC_VER)
@@ -179,5 +179,5 @@
} }
#endif #endif
#endif /* CTAOCRYPT_BLAKE2_INT_H */ #endif /* WOLFCRYPT_BLAKE2_INT_H */

View File

@@ -2,14 +2,14 @@
* *
* Copyright (C) 2006-2014 wolfSSL Inc. * Copyright (C) 2006-2014 wolfSSL Inc.
* *
* This file is part of CyaSSL. * This file is part of wolfSSL. (formerly known as CyaSSL)
* *
* CyaSSL is free software; you can redistribute it and/or modify * wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* CyaSSL is distributed in the hope that it will be useful, * wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
@@ -20,32 +20,32 @@
*/ */
#ifndef CTAO_CRYPT_CODING_H #ifndef WOLF_CRYPT_CODING_H
#define CTAO_CRYPT_CODING_H #define WOLF_CRYPT_CODING_H
#include <cyassl/ctaocrypt/types.h> #include <wolfssl/wolfcrypt/types.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* decode needed by CyaSSL */ /* decode needed by wolfSSL */
CYASSL_LOCAL int Base64_Decode(const byte* in, word32 inLen, byte* out, WOLFSSL_LOCAL int Base64_Decode(const byte* in, word32 inLen, byte* out,
word32* outLen); 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(WOLFSSL_CERT_GEN) || defined(HAVE_WEBSERVER)
/* encode isn't */ /* encode isn't */
CYASSL_API WOLFSSL_API
int Base64_Encode(const byte* in, word32 inLen, byte* out, int Base64_Encode(const byte* in, word32 inLen, byte* out,
word32* outLen); word32* outLen);
CYASSL_API WOLFSSL_API
int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out, int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out,
word32* outLen); word32* outLen);
#endif #endif
#if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) || defined(HAVE_FIPS) #if defined(OPENSSL_EXTRA) || defined(HAVE_WEBSERVER) || defined(HAVE_FIPS)
CYASSL_API WOLFSSL_API
int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen); int Base16_Decode(const byte* in, word32 inLen, byte* out, word32* outLen);
#endif #endif
@@ -54,5 +54,5 @@ CYASSL_LOCAL int Base64_Decode(const byte* in, word32 inLen, byte* out,
} /* extern "C" */ } /* extern "C" */
#endif #endif
#endif /* CTAO_CRYPT_CODING_H */ #endif /* WOLF_CRYPT_CODING_H */

View File

@@ -28,15 +28,6 @@
/* for reverse compatibility @wc_fips */ /* for reverse compatibility @wc_fips */
#ifndef HAVE_FIPS #ifndef HAVE_FIPS
#include <wolfssl/wolfcrypt/types.h> #include <wolfssl/wolfcrypt/types.h>
#define CYASSL_LEAVE WOLFSSL_LEAVE
#define CYASSL_ERROR WOLFSSL_ERROR
#define CYASSL_ENTER WOLFSSL_ENTER
#define CYASSL_MSG WOLFSSL_MSG
/* check old macros possibly declared */
#if defined(CYASSL_DEBUG) && !defined(DEBUG_WOLFSSL)
#define DEBUG_WOLFSSL
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@@ -19,11 +19,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/ */
/* check for old macro */
#if defined(CYASSL_MD2) && !defined(WOLFSSL_MD2)
#define WOLFSSL_MD2
#endif
#ifdef WOLFSSL_MD2 #ifdef WOLFSSL_MD2
#ifndef WOLF_CRYPT_MD2_H #ifndef WOLF_CRYPT_MD2_H

View File

@@ -27,13 +27,6 @@
#include <wolfssl/wolfcrypt/types.h> #include <wolfssl/wolfcrypt/types.h>
/* for md4 reverse compatibility */
#ifndef NO_MD4
#define InitMd4 wc_InitMd4
#define Md4Update wc_Md4Update
#define Md4Final wc_Md4Final
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif

View File

@@ -2,14 +2,14 @@
* *
* Copyright (C) 2006-2014 wolfSSL Inc. * Copyright (C) 2006-2014 wolfSSL Inc.
* *
* This file is part of CyaSSL. * This file is part of wolfSSL. (formerly known as CyaSSL)
* *
* CyaSSL is free software; you can redistribute it and/or modify * wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* CyaSSL is distributed in the hope that it will be useful, * wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
@@ -20,11 +20,11 @@
*/ */
#ifndef CTAO_CRYPT_MISC_H #ifndef WOLF_CRYPT_MISC_H
#define CTAO_CRYPT_MISC_H #define WOLF_CRYPT_MISC_H
#include <cyassl/ctaocrypt/types.h> #include <wolfssl/wolfcrypt/types.h>
#ifdef __cplusplus #ifdef __cplusplus
@@ -33,30 +33,30 @@
#ifdef NO_INLINE #ifdef NO_INLINE
CYASSL_LOCAL WOLFSSL_LOCAL
word32 rotlFixed(word32, word32); word32 rotlFixed(word32, word32);
CYASSL_LOCAL WOLFSSL_LOCAL
word32 rotrFixed(word32, word32); word32 rotrFixed(word32, word32);
CYASSL_LOCAL WOLFSSL_LOCAL
word32 ByteReverseWord32(word32); word32 ByteReverseWord32(word32);
CYASSL_LOCAL WOLFSSL_LOCAL
void ByteReverseWords(word32*, const word32*, word32); void ByteReverseWords(word32*, const word32*, word32);
CYASSL_LOCAL WOLFSSL_LOCAL
void XorWords(word*, const word*, word32); void XorWords(word*, const word*, word32);
CYASSL_LOCAL WOLFSSL_LOCAL
void xorbuf(void*, const void*, word32); void xorbuf(void*, const void*, word32);
#ifdef WORD64_AVAILABLE #ifdef WORD64_AVAILABLE
CYASSL_LOCAL WOLFSSL_LOCAL
word64 rotlFixed64(word64, word64); word64 rotlFixed64(word64, word64);
CYASSL_LOCAL WOLFSSL_LOCAL
word64 rotrFixed64(word64, word64); word64 rotrFixed64(word64, word64);
CYASSL_LOCAL WOLFSSL_LOCAL
word64 ByteReverseWord64(word64); word64 ByteReverseWord64(word64);
CYASSL_LOCAL WOLFSSL_LOCAL
void ByteReverseWords64(word64*, const word64*, word32); void ByteReverseWords64(word64*, const word64*, word32);
#endif /* WORD64_AVAILABLE */ #endif /* WORD64_AVAILABLE */
@@ -68,5 +68,5 @@ void ByteReverseWords64(word64*, const word64*, word32);
#endif #endif
#endif /* CTAO_CRYPT_MISC_H */ #endif /* WOLF_CRYPT_MISC_H */

View File

@@ -2,14 +2,14 @@
* *
* Copyright (C) 2006-2014 wolfSSL Inc. * Copyright (C) 2006-2014 wolfSSL Inc.
* *
* This file is part of CyaSSL. * This file is part of wolfSSL. (formerly known as CyaSSL)
* *
* CyaSSL is free software; you can redistribute it and/or modify * wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* CyaSSL is distributed in the hope that it will be useful, * wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.

View File

@@ -2,14 +2,14 @@
* *
* Copyright (C) 2006-2014 wolfSSL Inc. * Copyright (C) 2006-2014 wolfSSL Inc.
* *
* This file is part of CyaSSL. * This file is part of wolfSSL. (formerly known as CyaSSL)
* *
* CyaSSL is free software; you can redistribute it and/or modify * wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* CyaSSL is distributed in the hope that it will be useful, * wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.

View File

@@ -2,14 +2,14 @@
* *
* Copyright (C) 2006-2014 wolfSSL Inc. * Copyright (C) 2006-2014 wolfSSL Inc.
* *
* This file is part of CyaSSL. * This file is part of wolfSSL. (formerly known as CyaSSL)
* *
* CyaSSL is free software; you can redistribute it and/or modify * wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* CyaSSL is distributed in the hope that it will be useful, * wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.

View File

@@ -2,7 +2,7 @@
* *
* Copyright (C) 2006-2014 wolfSSL Inc. * Copyright (C) 2006-2014 wolfSSL Inc.
* *
* This file is part of wolfSSL. * This file is part of wolfSSL. (formerly known as CyaSSL)
* *
* wolfSSL is free software; you can redistribute it and/or modify * wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -27,7 +27,6 @@
#ifdef HAVE_FIPS #ifdef HAVE_FIPS
#include <cyassl/ctaocrypt/wc_port.h> #include <cyassl/ctaocrypt/wc_port.h>
#define wolfSSL_Mutex CyaSSL_Mutex #define wolfSSL_Mutex CyaSSL_Mutex
#else #else
#ifdef __cplusplus #ifdef __cplusplus