diff --git a/include/user_settings.h b/include/user_settings.h index 82da987b1..abb9638f7 100644 --- a/include/user_settings.h +++ b/include/user_settings.h @@ -160,12 +160,10 @@ extern int tolower(int c); defined(WOLFBOOT_SIGN_RSA3072) || \ defined(WOLFBOOT_SIGN_RSA4096) || \ defined(WOLFCRYPT_SECURE_MODE) - # define WC_RSA_BLINDING # define WC_RSA_DIRECT # define RSA_LOW_MEM # define WC_ASN_HASH_SHA256 - # if !defined(WOLFBOOT_TPM) && !defined(WOLFCRYPT_SECURE_MODE) # define WOLFSSL_RSA_VERIFY_INLINE # define WOLFSSL_RSA_VERIFY_ONLY @@ -177,15 +175,12 @@ extern int tolower(int c); # define WOLFSSL_SP_SMALL # define WOLFSSL_SP_MATH # endif - - # ifdef WOLFBOOT_SIGN_RSA2048 # define FP_MAX_BITS (2048 * 2) # define WOLFSSL_SP_NO_3072 # define WOLFSSL_SP_NO_4096 # define WC_ASN_HASH_SHA256 # endif - # ifdef WOLFBOOT_SIGN_RSA3072 # define FP_MAX_BITS (3072 * 2) # define WOLFSSL_SP_NO_2048 @@ -203,7 +198,7 @@ extern int tolower(int c); #ifdef WOLFBOOT_HASH_SHA3_384 # define WOLFSSL_SHA3 -# if defined(NO_RSA) && !defined(WOLFBOOT_TPM_PARMENC) && \ +# if defined(NO_RSA) && !defined(WOLFBOOT_TPM) && \ !defined(WOLFCRYPT_SECURE_MODE) # define NO_SHA256 # endif @@ -211,7 +206,7 @@ extern int tolower(int c); #ifdef WOLFBOOT_HASH_SHA384 # define WOLFSSL_SHA384 -# if defined(NO_RSA) && !defined(WOLFBOOT_TPM_PARMENC) && \ +# if defined(NO_RSA) && !defined(WOLFBOOT_TPM) && \ !defined(WOLFCRYPT_SECURE_MODE) # define NO_SHA256 # endif @@ -324,12 +319,14 @@ extern int tolower(int c); #endif #if !defined(WOLFBOOT_TPM) && !defined(WOLFCRYPT_SECURE_MODE) - #define NO_HMAC - #define WC_NO_RNG - #define WC_NO_HASHDRBG - #define NO_DEV_RANDOM - #define NO_ECC_KEY_EXPORT - #define NO_ASN +# define NO_HMAC +# define WC_NO_RNG +# define WC_NO_HASHDRBG +# define NO_DEV_RANDOM +# define NO_ECC_KEY_EXPORT +# ifdef NO_RSA +# define NO_ASN +# endif #endif #define NO_CMAC