Skip to content

Commit

Permalink
Re-enable ASN with RSA
Browse files Browse the repository at this point in the history
  • Loading branch information
danielinux committed Sep 12, 2023
1 parent fe1c388 commit 1d7bc4f
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions include/user_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -203,15 +198,15 @@ 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
#endif

#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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1d7bc4f

Please sign in to comment.