progress on name change, arc4, aes, camilea
This commit is contained in:
parent
53057f0b0d
commit
881c0b941a
@ -1472,7 +1472,7 @@ AC_ARG_ENABLE([smallstack],
|
||||
|
||||
if test "x$ENABLED_SMALL_STACK" = "xyes"
|
||||
then
|
||||
AM_CFLAGS="$AM_CFLAGS -DCYASSL_SMALL_STACK"
|
||||
AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_SMALL_STACK"
|
||||
fi
|
||||
|
||||
|
||||
|
21
cyassl/ssl.h
21
cyassl/ssl.h
@ -283,6 +283,27 @@
|
||||
|
||||
/* End wolfssl -> cyassl -> openssl compatibility */
|
||||
|
||||
|
||||
/* JRB macro redefinitions and api calls for cryptography for reverse compat. */
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
#define CYASSL_SMALL_STACK
|
||||
#endif
|
||||
|
||||
|
||||
/* wrapper around macros until they are changed in cyassl code
|
||||
* needs investigation in regards to macros in fips */
|
||||
#define WOLFSSL_MAX_16BIT CYASSL_MAX_16BIT
|
||||
#define WOLFSSL_MSG(x) CYASSL_MSG(x)
|
||||
|
||||
/* for arc4 reverse compatibility */
|
||||
#ifndef NO_RC4
|
||||
#define CYASSL_ARC4_CAVIUM_MAGIC WOLFSSL_ARC4_CAVIUM_MAGIC
|
||||
#define Arc4Process wc_Arc4Process
|
||||
#define Arc4SetKey wc_Arc4SetKey
|
||||
#define Arc4InitCavium wc_Arc4InitCavium
|
||||
#define Arc4FreeCavium wc_Arc4FreeCavium
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
@ -29,10 +29,6 @@
|
||||
|
||||
#include <wolfssl/wolfcrypt/arc4.h>
|
||||
|
||||
/* wrapper around macros until they are changed in cyassl code */
|
||||
#define WOLFSSL_MAX_16BIT CYASSL_MAX_16BIT
|
||||
#define WOLFSSL_MSG(x) CYASSL_MSG(x)
|
||||
|
||||
|
||||
#ifdef HAVE_CAVIUM
|
||||
static void wc_Arc4CaviumSetKey(Arc4* arc4, const byte* key, word32 length);
|
||||
|
@ -29,14 +29,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.
|
||||
@ -70,6 +70,8 @@
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/* u32 must be 32bit word */
|
||||
typedef unsigned int u32;
|
||||
typedef unsigned char u8;
|
||||
@ -492,7 +494,7 @@ static int camellia_setup128(const unsigned char *key, u32 *subkey)
|
||||
u32 il, ir, t0, t1, w0, w1;
|
||||
u32 kw4l, kw4r, dw, tl, tr;
|
||||
|
||||
#ifdef CYASSL_SMALL_STACK
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
u32* subL;
|
||||
u32* subR;
|
||||
|
||||
@ -710,7 +712,7 @@ static int camellia_setup128(const unsigned char *key, u32 *subkey)
|
||||
dw = CamelliaSubkeyL(23) ^ CamelliaSubkeyR(23), dw = CAMELLIA_RL8(dw);
|
||||
CamelliaSubkeyR(23) = CamelliaSubkeyL(23) ^ dw, CamelliaSubkeyL(23) = dw;
|
||||
|
||||
#ifdef CYASSL_SMALL_STACK
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
XFREE(subL, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
XFREE(subR, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
#endif
|
||||
@ -725,7 +727,7 @@ static int camellia_setup256(const unsigned char *key, u32 *subkey)
|
||||
u32 il, ir, t0, t1, w0, w1; /* temporary variables */
|
||||
u32 kw4l, kw4r, dw, tl, tr;
|
||||
|
||||
#ifdef CYASSL_SMALL_STACK
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
u32* subL;
|
||||
u32* subR;
|
||||
|
||||
@ -1017,7 +1019,7 @@ static int camellia_setup256(const unsigned char *key, u32 *subkey)
|
||||
dw = CamelliaSubkeyL(31) ^ CamelliaSubkeyR(31), dw = CAMELLIA_RL8(dw);
|
||||
CamelliaSubkeyR(31) = CamelliaSubkeyL(31) ^ dw,CamelliaSubkeyL(31) = dw;
|
||||
|
||||
#ifdef CYASSL_SMALL_STACK
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
XFREE(subL, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
XFREE(subR, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
#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.
|
||||
@ -31,12 +31,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* for reverse compatibility */
|
||||
#define CYASSL_ARC4_CAVIUM_MAGIC WOLFSSL_ARC4_CAVIUM_MAGIC
|
||||
#define Arc4Process wc_Arc4Process
|
||||
#define Arc4SetKey wc_Arc4SetKey
|
||||
#define Arc4InitCavium wc_Arc4InitCavium
|
||||
#define Arc4FreeCavium wc_Arc4FreeCavium
|
||||
|
||||
#define WOLFSSL_ARC4_CAVIUM_MAGIC 0xBEEF0001
|
||||
|
||||
|
@ -48,8 +48,8 @@
|
||||
|
||||
#ifdef HAVE_CAMELLIA
|
||||
|
||||
#ifndef CTAO_CRYPT_CAMELLIA_H
|
||||
#define CTAO_CRYPT_CAMELLIA_H
|
||||
#ifndef WOLF_CRYPT_CAMELLIA_H
|
||||
#define WOLF_CRYPT_CAMELLIA_H
|
||||
|
||||
|
||||
#include <cyassl/ctaocrypt/types.h>
|
||||
@ -91,6 +91,6 @@ CYASSL_API void CamelliaCbcDecrypt(Camellia* cam,
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* CTAO_CRYPT_AES_H */
|
||||
#endif /* WOLF_CRYPT_AES_H */
|
||||
#endif /* HAVE_CAMELLIA */
|
||||
|
Loading…
Reference in New Issue
Block a user