From d2cc582939cf1b7ee57a2be3f48105e89ab4947c Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Wed, 14 Oct 2015 10:51:39 -0600 Subject: [PATCH] fips related macros for configurations using AES direct and DES ECB --- cyassl/ctaocrypt/settings_comp.h | 15 ++++++++++++++- wolfssl/wolfcrypt/rsa.h | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/cyassl/ctaocrypt/settings_comp.h b/cyassl/ctaocrypt/settings_comp.h index 89278a2db..f1832c3f0 100644 --- a/cyassl/ctaocrypt/settings_comp.h +++ b/cyassl/ctaocrypt/settings_comp.h @@ -50,9 +50,22 @@ #if defined(NO_WOLFSSL_MEMORY) && !defined(NO_CYASSL_MEMORY) #define NO_CYASSL_MEMORY #endif -#ifdef WOLFSSL_KEY_GEN +#if defined(WOLFSSL_KEY_GEN) && !defined(CYASSL_KEY_GEN) #define CYASSL_KEY_GEN #endif +/* AES */ +#if defined(WOLFSSL_AES_DIRECT) && !defined(CYASSL_AES_DIRECT) + #define CYASSL_AES_DIRECT +#endif +#if defined(WOLFSSL_AES_COUNTER) && !defined(CYASSL_AES_COUNTER) + #define CYASSL_AES_COUNTER +#endif + +/* DES */ +#if defined(WOLFSSL_DES_ECB) && !defined(CYASSL_DES_ECB) + #define CYASSL_DES_ECB +#endif + #endif /* CTAO_CRYPT_SETTINGS_C_H */ diff --git a/wolfssl/wolfcrypt/rsa.h b/wolfssl/wolfcrypt/rsa.h index 9da3becf2..8141367c9 100644 --- a/wolfssl/wolfcrypt/rsa.h +++ b/wolfssl/wolfcrypt/rsa.h @@ -99,13 +99,13 @@ WOLFSSL_API int wc_RsaPublicKeyDecodeRaw(const byte* n, word32 nSz, const byte* e, word32 eSz, RsaKey* key); #ifdef WOLFSSL_KEY_GEN WOLFSSL_API int wc_RsaKeyToDer(RsaKey*, byte* output, word32 inLen); - WOLFSSL_API int wc_RsaKeyToPublicDer(RsaKey*, byte* output, word32 inLen); #endif #endif /* HAVE_FIPS*/ WOLFSSL_API int wc_RsaFlattenPublicKey(RsaKey*, byte*, word32*, byte*, word32*); #ifdef WOLFSSL_KEY_GEN + WOLFSSL_API int wc_RsaKeyToPublicDer(RsaKey*, byte* output, word32 inLen); WOLFSSL_API int wc_MakeRsaKey(RsaKey* key, int size, long e, WC_RNG* rng); #endif