CYASSL -> WOLFSSL macros
This commit is contained in:
parent
33fff07eee
commit
639637278d
18
tests/hash.c
18
tests/hash.c
@ -94,7 +94,7 @@ int HashTest(void)
|
||||
printf( " SHA-256 test passed!\n");
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_SHA512
|
||||
#ifdef WOLFSSL_SHA512
|
||||
if ( (ret = sha512_test()) ) {
|
||||
printf( " SHA-512 test failed!\n");
|
||||
return ret;
|
||||
@ -102,7 +102,7 @@ int HashTest(void)
|
||||
printf( " SHA-512 test passed!\n");
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_SHA384
|
||||
#ifdef WOLFSSL_SHA384
|
||||
if ( (ret = sha384_test()) ) {
|
||||
printf( " SHA-384 test failed!\n");
|
||||
return ret;
|
||||
@ -110,7 +110,7 @@ int HashTest(void)
|
||||
printf( " SHA-384 test passed!\n");
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_RIPEMD
|
||||
#ifdef WOLFSSL_RIPEMD
|
||||
if ( (ret = ripemd_test()) ) {
|
||||
printf( " RIPEMD test failed!\n");
|
||||
return ret;
|
||||
@ -139,7 +139,7 @@ int HashTest(void)
|
||||
printf( " HMAC-SHA256 test passed!\n");
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_SHA384
|
||||
#ifdef WOLFSSL_SHA384
|
||||
if ( (ret = hmac_sha384_test()) )
|
||||
printf( " HMAC-SHA384 test failed!\n");
|
||||
else
|
||||
@ -402,7 +402,7 @@ int sha256_test(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_SHA512
|
||||
#ifdef WOLFSSL_SHA512
|
||||
int sha512_test(void)
|
||||
{
|
||||
Sha512 sha;
|
||||
@ -456,7 +456,7 @@ int sha512_test(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_SHA384
|
||||
#ifdef WOLFSSL_SHA384
|
||||
int sha384_test()
|
||||
{
|
||||
Sha384 sha;
|
||||
@ -508,7 +508,7 @@ int sha384_test()
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CYASSL_RIPEMD
|
||||
#ifdef WOLFSSL_RIPEMD
|
||||
int ripemd_test(void)
|
||||
{
|
||||
RipeMd ripemd;
|
||||
@ -561,7 +561,7 @@ int ripemd_test(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CYASSL_RIPEMD */
|
||||
#endif /* WOLFSSL_RIPEMD */
|
||||
|
||||
#if !defined(NO_HMAC) && !defined(NO_MD5)
|
||||
int hmac_md5_test(void)
|
||||
@ -775,7 +775,7 @@ int hmac_sha256_test(void)
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(NO_HMAC) && defined(CYASSL_SHA384)
|
||||
#if !defined(NO_HMAC) && defined(WOLFSSL_SHA384)
|
||||
int hmac_sha384_test(void)
|
||||
{
|
||||
Hmac hmac;
|
||||
|
@ -44,7 +44,7 @@
|
||||
#include "examples/server/server.h"
|
||||
|
||||
|
||||
static CYASSL_CTX* cipherSuiteCtx = NULL;
|
||||
static WOLFSSL_CTX* cipherSuiteCtx = NULL;
|
||||
static char nonblockFlag[] = "-N";
|
||||
static char noVerifyFlag[] = "-d";
|
||||
static char portFlag[] = "-p";
|
||||
@ -121,7 +121,7 @@ static int execute_test_case(int svr_argc, char** svr_argv,
|
||||
int cli_argc, char** cli_argv,
|
||||
int addNoVerify, int addNonBlocking)
|
||||
{
|
||||
#ifdef CYASSL_TIRTOS
|
||||
#ifdef WOLFSSL_TIRTOS
|
||||
func_args cliArgs = {0};
|
||||
func_args svrArgs = {0};
|
||||
cliArgs.argc = cli_argc;
|
||||
@ -192,7 +192,7 @@ static int execute_test_case(int svr_argc, char** svr_argv,
|
||||
strcat(commandLine, flagSep);
|
||||
}
|
||||
}
|
||||
#if !defined(USE_WINDOWS_API) && !defined(CYASSL_TIRTOS)
|
||||
#if !defined(USE_WINDOWS_API) && !defined(WOLFSSL_TIRTOS)
|
||||
/* add port 0 */
|
||||
if (svr_argc + 2 > MAX_ARGS)
|
||||
printf("cannot add the magic port number flag to server\n");
|
||||
@ -231,7 +231,7 @@ static int execute_test_case(int svr_argc, char** svr_argv,
|
||||
|
||||
InitTcpReady(&ready);
|
||||
|
||||
#ifdef CYASSL_TIRTOS
|
||||
#ifdef WOLFSSL_TIRTOS
|
||||
fdOpenSession(Task_self());
|
||||
#endif
|
||||
|
||||
@ -239,7 +239,7 @@ static int execute_test_case(int svr_argc, char** svr_argv,
|
||||
svrArgs.signal = &ready;
|
||||
start_thread(server_test, &svrArgs, &serverThread);
|
||||
wait_tcp_ready(&svrArgs);
|
||||
#if !defined(USE_WINDOWS_API) && !defined(CYASSL_TIRTOS)
|
||||
#if !defined(USE_WINDOWS_API) && !defined(WOLFSSL_TIRTOS)
|
||||
if (ready.port != 0)
|
||||
{
|
||||
if (cli_argc + 2 > MAX_ARGS)
|
||||
@ -268,7 +268,7 @@ static int execute_test_case(int svr_argc, char** svr_argv,
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#ifdef CYASSL_TIRTOS
|
||||
#ifdef WOLFSSL_TIRTOS
|
||||
fdCloseSession(Task_self());
|
||||
#endif
|
||||
FreeTcpReady(&ready);
|
||||
@ -446,7 +446,7 @@ int SuiteTest(void)
|
||||
/* any extra cases will need another argument */
|
||||
args.argc = 2;
|
||||
|
||||
#ifdef CYASSL_DTLS
|
||||
#ifdef WOLFSSL_DTLS
|
||||
/* add dtls extra suites */
|
||||
strcpy(argv0[1], "tests/test-dtls.conf");
|
||||
printf("starting dtls extra cipher suite tests\n");
|
||||
|
@ -1688,7 +1688,7 @@ static void wc_AesDecrypt(Aes* aes, const byte* inBlock, byte* outBlock)
|
||||
return wc_AesSetKeyLocal(aes, userKey, keylen, iv, dir);
|
||||
}
|
||||
|
||||
#if defined(WOLFSSL_AES_DIRECT) || defined(CYASSL_AES_COUNTER)
|
||||
#if defined(WOLFSSL_AES_DIRECT) || defined(WOLFSSL_AES_COUNTER)
|
||||
|
||||
/* AES-CTR and AES-DIRECT need to use this for key setup, no aesni yet */
|
||||
int wc_AesSetKeyDirect(Aes* aes, const byte* userKey, word32 keylen,
|
||||
@ -1697,7 +1697,7 @@ static void wc_AesDecrypt(Aes* aes, const byte* inBlock, byte* outBlock)
|
||||
return wc_AesSetKeyLocal(aes, userKey, keylen, iv, dir);
|
||||
}
|
||||
|
||||
#endif /* WOLFSSL_AES_DIRECT || CYASSL_AES_COUNTER */
|
||||
#endif /* WOLFSSL_AES_DIRECT || WOLFSSL_AES_COUNTER */
|
||||
#endif /* STM32F2_CRYPTO, wc_AesSetKey block */
|
||||
|
||||
|
||||
|
@ -74,7 +74,7 @@ int wc_Des3_CbcDecrypt(Des3* des, byte* out, const byte* in, word32 sz)
|
||||
}
|
||||
|
||||
|
||||
#ifdef CYASSL_DES_ECB
|
||||
#ifdef WOLFSSL_DES_ECB
|
||||
|
||||
/* One block, compatibility only */
|
||||
int wc_Des_EcbEncrypt(Des* des, byte* out, const byte* in, word32 sz)
|
||||
@ -82,7 +82,7 @@ int wc_Des_EcbEncrypt(Des* des, byte* out, const byte* in, word32 sz)
|
||||
return Des_EcbEncrypt(des, out, in, sz);
|
||||
}
|
||||
|
||||
#endif /* CYASSL_DES_ECB */
|
||||
#endif /* WOLFSSL_DES_ECB */
|
||||
|
||||
|
||||
void wc_Des_SetIV(Des* des, const byte* iv)
|
||||
|
@ -927,8 +927,8 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
||||
}
|
||||
#endif /* FREESCALE_K70_RNGA */
|
||||
|
||||
#elif defined(WOLFSSL_SAFERTOS) || defined(CYASSL_LEANPSK) \
|
||||
|| defined(WOLFSSL_IAR_ARM) || defined(CYASSL_MDK_ARM)
|
||||
#elif defined(WOLFSSL_SAFERTOS) || defined(WOLFSSL_LEANPSK) \
|
||||
|| defined(WOLFSSL_IAR_ARM) || defined(WOLFSSL_MDK_ARM)
|
||||
|
||||
#warning "write a real random seed!!!!, just for testing now"
|
||||
|
||||
@ -972,7 +972,7 @@ int wc_GenerateSeed(OS_Seed* os, byte* output, word32 sz)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#elif defined(WOLFSSL_LPC43xx) || defined(CYASSL_STM32F2xx)
|
||||
#elif defined(WOLFSSL_LPC43xx) || defined(WOLFSSL_STM32F2xx)
|
||||
|
||||
#warning "write a real random seed!!!!, just for testing now"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user