forked from wolfSSL/wolfssl
update to comment headers
This commit is contained in:
@@ -28,6 +28,14 @@
|
||||
/* for fips compatibility @wc_fips */
|
||||
#ifndef HAVE_FIPS
|
||||
#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
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@@ -30,7 +30,7 @@
|
||||
/* 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.,
|
||||
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
|
||||
*/
|
||||
|
||||
@@ -148,7 +148,7 @@ STATIC INLINE void ByteReverseWords64(word64* out, const word64* in,
|
||||
#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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
if (((cyassl_word)buf | (cyassl_word)mask | count) % CYASSL_WORD_SIZE == 0)
|
||||
XorWords( (cyassl_word*)buf,
|
||||
(const cyassl_word*)mask, count / CYASSL_WORD_SIZE);
|
||||
if (((wolfssl_word)buf | (wolfssl_word)mask | count) % WOLFSSL_WORD_SIZE == 0)
|
||||
XorWords( (wolfssl_word*)buf,
|
||||
(const wolfssl_word*)mask, count / WOLFSSL_WORD_SIZE);
|
||||
else {
|
||||
word32 i;
|
||||
byte* b = (byte*)buf;
|
||||
|
@@ -406,7 +406,7 @@ int wc_ShaHash(const byte* data, word32 len, byte* hash)
|
||||
#endif
|
||||
|
||||
if ((ret = wc_InitSha(sha)) != 0) {
|
||||
CYASSL_MSG("wc_InitSha failed");
|
||||
WOLFSSL_MSG("wc_InitSha failed");
|
||||
}
|
||||
else {
|
||||
wc_ShaUpdate(sha, data, len);
|
||||
|
@@ -14,14 +14,14 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (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
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
@@ -32,10 +32,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CTAOCRYPT_BLAKE2_IMPL_H
|
||||
#define CTAOCRYPT_BLAKE2_IMPL_H
|
||||
#ifndef WOLFCRYPT_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 )
|
||||
{
|
||||
@@ -150,5 +150,5 @@ static inline void secure_zero_memory( void *v, word64 n )
|
||||
while( n-- ) *p++ = 0;
|
||||
}
|
||||
|
||||
#endif /* CTAOCRYPT_BLAKE2_IMPL_H */
|
||||
#endif /* WOLFCRYPT_BLAKE2_IMPL_H */
|
||||
|
||||
|
@@ -14,14 +14,14 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (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
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
@@ -33,10 +33,10 @@
|
||||
|
||||
|
||||
|
||||
#ifndef CTAOCRYPT_BLAKE2_INT_H
|
||||
#define CTAOCRYPT_BLAKE2_INT_H
|
||||
#ifndef WOLFCRYPT_BLAKE2_INT_H
|
||||
#define WOLFCRYPT_BLAKE2_INT_H
|
||||
|
||||
#include <cyassl/ctaocrypt/types.h>
|
||||
#include <wolfssl/wolfcrypt/types.h>
|
||||
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
@@ -179,5 +179,5 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CTAOCRYPT_BLAKE2_INT_H */
|
||||
#endif /* WOLFCRYPT_BLAKE2_INT_H */
|
||||
|
||||
|
@@ -2,14 +2,14 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (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
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
@@ -20,32 +20,32 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CTAO_CRYPT_CODING_H
|
||||
#define CTAO_CRYPT_CODING_H
|
||||
#ifndef WOLF_CRYPT_CODING_H
|
||||
#define WOLF_CRYPT_CODING_H
|
||||
|
||||
#include <cyassl/ctaocrypt/types.h>
|
||||
#include <wolfssl/wolfcrypt/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* decode needed by CyaSSL */
|
||||
CYASSL_LOCAL int Base64_Decode(const byte* in, word32 inLen, byte* out,
|
||||
/* decode needed by wolfSSL */
|
||||
WOLFSSL_LOCAL 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(WOLFSSL_CERT_GEN) || defined(HAVE_WEBSERVER)
|
||||
/* encode isn't */
|
||||
CYASSL_API
|
||||
WOLFSSL_API
|
||||
int Base64_Encode(const byte* in, word32 inLen, byte* out,
|
||||
word32* outLen);
|
||||
CYASSL_API
|
||||
WOLFSSL_API
|
||||
int Base64_EncodeEsc(const byte* in, word32 inLen, byte* out,
|
||||
word32* outLen);
|
||||
#endif
|
||||
|
||||
#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);
|
||||
#endif
|
||||
|
||||
@@ -54,5 +54,5 @@ CYASSL_LOCAL int Base64_Decode(const byte* in, word32 inLen, byte* out,
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* CTAO_CRYPT_CODING_H */
|
||||
#endif /* WOLF_CRYPT_CODING_H */
|
||||
|
||||
|
@@ -28,15 +28,6 @@
|
||||
/* for reverse compatibility @wc_fips */
|
||||
#ifndef HAVE_FIPS
|
||||
#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
|
||||
extern "C" {
|
||||
|
@@ -19,11 +19,6 @@
|
||||
* 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
|
||||
|
||||
#ifndef WOLF_CRYPT_MD2_H
|
||||
|
@@ -27,13 +27,6 @@
|
||||
|
||||
#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
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@@ -2,14 +2,14 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (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
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
@@ -20,11 +20,11 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CTAO_CRYPT_MISC_H
|
||||
#define CTAO_CRYPT_MISC_H
|
||||
#ifndef WOLF_CRYPT_MISC_H
|
||||
#define WOLF_CRYPT_MISC_H
|
||||
|
||||
|
||||
#include <cyassl/ctaocrypt/types.h>
|
||||
#include <wolfssl/wolfcrypt/types.h>
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -33,30 +33,30 @@
|
||||
|
||||
|
||||
#ifdef NO_INLINE
|
||||
CYASSL_LOCAL
|
||||
WOLFSSL_LOCAL
|
||||
word32 rotlFixed(word32, word32);
|
||||
CYASSL_LOCAL
|
||||
WOLFSSL_LOCAL
|
||||
word32 rotrFixed(word32, word32);
|
||||
|
||||
CYASSL_LOCAL
|
||||
WOLFSSL_LOCAL
|
||||
word32 ByteReverseWord32(word32);
|
||||
CYASSL_LOCAL
|
||||
WOLFSSL_LOCAL
|
||||
void ByteReverseWords(word32*, const word32*, word32);
|
||||
|
||||
CYASSL_LOCAL
|
||||
WOLFSSL_LOCAL
|
||||
void XorWords(word*, const word*, word32);
|
||||
CYASSL_LOCAL
|
||||
WOLFSSL_LOCAL
|
||||
void xorbuf(void*, const void*, word32);
|
||||
|
||||
#ifdef WORD64_AVAILABLE
|
||||
CYASSL_LOCAL
|
||||
WOLFSSL_LOCAL
|
||||
word64 rotlFixed64(word64, word64);
|
||||
CYASSL_LOCAL
|
||||
WOLFSSL_LOCAL
|
||||
word64 rotrFixed64(word64, word64);
|
||||
|
||||
CYASSL_LOCAL
|
||||
WOLFSSL_LOCAL
|
||||
word64 ByteReverseWord64(word64);
|
||||
CYASSL_LOCAL
|
||||
WOLFSSL_LOCAL
|
||||
void ByteReverseWords64(word64*, const word64*, word32);
|
||||
#endif /* WORD64_AVAILABLE */
|
||||
|
||||
@@ -68,5 +68,5 @@ void ByteReverseWords64(word64*, const word64*, word32);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* CTAO_CRYPT_MISC_H */
|
||||
#endif /* WOLF_CRYPT_MISC_H */
|
||||
|
||||
|
@@ -2,14 +2,14 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (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
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@@ -2,14 +2,14 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (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
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@@ -2,14 +2,14 @@
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (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
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -27,7 +27,6 @@
|
||||
#ifdef HAVE_FIPS
|
||||
#include <cyassl/ctaocrypt/wc_port.h>
|
||||
#define wolfSSL_Mutex CyaSSL_Mutex
|
||||
|
||||
#else
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user