forked from wolfSSL/wolfssl
wolfcrypt api testwolfcrypt update
This commit is contained in:
16
Makefile.am
16
Makefile.am
@ -75,25 +75,9 @@ include swig/include.am
|
|||||||
|
|
||||||
include src/include.am
|
include src/include.am
|
||||||
include support/include.am
|
include support/include.am
|
||||||
#-------------------------------------#
|
|
||||||
if BUILD_FIPS
|
|
||||||
include ctaocrypt/benchmark/include.am
|
|
||||||
else
|
|
||||||
include wolfcrypt/benchmark/include.am
|
include wolfcrypt/benchmark/include.am
|
||||||
endif
|
|
||||||
#-------------------------------------#
|
|
||||||
if BUILD_FIPS
|
|
||||||
include ctaocrypt/src/include.am
|
|
||||||
else
|
|
||||||
include wolfcrypt/src/include.am
|
include wolfcrypt/src/include.am
|
||||||
endif
|
|
||||||
#-------------------------------------#
|
|
||||||
if BUILD_FIPS
|
|
||||||
include ctaocrypt/test/include.am
|
|
||||||
else
|
|
||||||
include wolfcrypt/test/include.am
|
include wolfcrypt/test/include.am
|
||||||
endif
|
|
||||||
#-------------------------------------#
|
|
||||||
include examples/client/include.am
|
include examples/client/include.am
|
||||||
include examples/server/include.am
|
include examples/server/include.am
|
||||||
include examples/echoclient/include.am
|
include examples/echoclient/include.am
|
||||||
|
@ -1521,7 +1521,7 @@ void bench_eccKeyAgree(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#elif defined MICROCHIP_PIC32
|
#elif defined MICROCHIP_PIC32
|
||||||
#if defined(CYASSL_MICROCHIP_PIC32MZ)
|
#if defined(WOLFSSL_MICROCHIP_PIC32MZ)
|
||||||
#define CLOCK 80000000.0
|
#define CLOCK 80000000.0
|
||||||
#else
|
#else
|
||||||
#include <peripheral/timer.h>
|
#include <peripheral/timer.h>
|
||||||
@ -1543,7 +1543,7 @@ void bench_eccKeyAgree(void)
|
|||||||
return ( ns / CLOCK * 2.0);
|
return ( ns / CLOCK * 2.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(CYASSL_IAR_ARM) || defined (CYASSL_MDK_ARM)
|
#elif defined(WOLFSSL_IAR_ARM) || defined (WOLFSSL_MDK_ARM)
|
||||||
#warning "Write your current_time()"
|
#warning "Write your current_time()"
|
||||||
double current_time(int reset) { return 0.0 ; }
|
double current_time(int reset) { return 0.0 ; }
|
||||||
|
|
||||||
@ -1560,7 +1560,7 @@ void bench_eccKeyAgree(void)
|
|||||||
return (double)tickCount / 1000;
|
return (double)tickCount / 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined (CYASSL_TIRTOS)
|
#elif defined (WOLFSSL_TIRTOS)
|
||||||
|
|
||||||
extern double current_time(int reset);
|
extern double current_time(int reset);
|
||||||
|
|
||||||
|
@ -28,8 +28,14 @@
|
|||||||
|
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
/* included for fips*/
|
/* included for fips @wc_fips */
|
||||||
#include <cyassl/ctaocrypt/aes.h>
|
#include <cyassl/ctaocrypt/aes.h>
|
||||||
|
#if defined(CYASSL_AES_COUNTER) && !defined(WOLFSSL_AES_COUNTER)
|
||||||
|
#define WOLFSSL_AES_COUNTER
|
||||||
|
#endif
|
||||||
|
#if !defined(WOLFSSL_AES_DIRECT) && defined(CYASSL_AES_DIRECT)
|
||||||
|
#define WOLFSSL_AES_DIRECT
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -44,11 +50,11 @@
|
|||||||
const byte* key, word32 keySz, const byte* iv);
|
const byte* key, word32 keySz, const byte* iv);
|
||||||
|
|
||||||
/* AES-CTR */
|
/* AES-CTR */
|
||||||
#ifdef CYASSL_AES_COUNTER
|
#ifdef WOLFSSL_AES_COUNTER
|
||||||
WOLFSSL_API void wc_AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz);
|
WOLFSSL_API void wc_AesCtrEncrypt(Aes* aes, byte* out, const byte* in, word32 sz);
|
||||||
#endif
|
#endif
|
||||||
/* AES-DIRECT */
|
/* AES-DIRECT */
|
||||||
#if defined(CYASSL_AES_DIRECT)
|
#if defined(WOLFSSL_AES_DIRECT)
|
||||||
WOLFSSL_API void wc_AesEncryptDirect(Aes* aes, byte* out, const byte* in);
|
WOLFSSL_API void wc_AesEncryptDirect(Aes* aes, byte* out, const byte* in);
|
||||||
WOLFSSL_API void wc_AesDecryptDirect(Aes* aes, byte* out, const byte* in);
|
WOLFSSL_API void wc_AesDecryptDirect(Aes* aes, byte* out, const byte* in);
|
||||||
WOLFSSL_API int wc_AesSetKeyDirect(Aes* aes, const byte* key, word32 len,
|
WOLFSSL_API int wc_AesSetKeyDirect(Aes* aes, const byte* key, word32 len,
|
||||||
|
@ -24,8 +24,14 @@
|
|||||||
#ifndef WOLF_CRYPT_RSA_H
|
#ifndef WOLF_CRYPT_RSA_H
|
||||||
#define WOLF_CRYPT_RSA_H
|
#define WOLF_CRYPT_RSA_H
|
||||||
|
|
||||||
/* for fips */
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
|
||||||
|
/* for fips @wc_fips */
|
||||||
#include <cyassl/ctaocrypt/rsa.h>
|
#include <cyassl/ctaocrypt/rsa.h>
|
||||||
|
#if defined(CYASSL_KEY_GEN) && !defined(WOLFSSL_KEY_GEN)
|
||||||
|
#define WOLFSSL_KEY_GEN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -101,3 +107,4 @@ WOLFSSL_API int wc_RsaFlattenPublicKey(RsaKey*, byte*, word32*, byte*,
|
|||||||
#endif /* WOLF_CRYPT_RSA_H */
|
#endif /* WOLF_CRYPT_RSA_H */
|
||||||
|
|
||||||
#endif /* NO_RSA */
|
#endif /* NO_RSA */
|
||||||
|
|
||||||
|
@ -678,7 +678,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \
|
#if !defined(XMALLOC_USER) && !defined(MICRIUM_MALLOC) && \
|
||||||
!defined(WOLFSSL_LEANPSK) && !defined(NO_CYASSL_MEMORY)
|
!defined(WOLFSSL_LEANPSK) && !defined(NO_WOLFSSL_MEMORY)
|
||||||
#define USE_WOLFSSL_MEMORY
|
#define USE_WOLFSSL_MEMORY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -713,7 +713,7 @@
|
|||||||
#elif defined(XSTREAM_ALIGNMENT)
|
#elif defined(XSTREAM_ALIGNMENT)
|
||||||
#define WOLFSSL_GENERAL_ALIGNMENT 4
|
#define WOLFSSL_GENERAL_ALIGNMENT 4
|
||||||
#elif defined(FREESCALE_MMCAU)
|
#elif defined(FREESCALE_MMCAU)
|
||||||
#define WOLFSSL_GENERAL_ALIGNMENT CYASSL_MMCAU_ALIGNMENT
|
#define WOLFSSL_GENERAL_ALIGNMENT WOLFSSL_MMCAU_ALIGNMENT
|
||||||
#else
|
#else
|
||||||
#define WOLFSSL_GENERAL_ALIGNMENT 0
|
#define WOLFSSL_GENERAL_ALIGNMENT 0
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user