Skip to content

Commit

Permalink
More fixes to user_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
danielinux committed Sep 12, 2023
1 parent 16ca2db commit 18fd398
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions include/user_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ extern int tolower(int c);

#if defined(WOLFBOOT_TPM_KEYSTORE) || defined(WOLFBOOT_TPM_SEAL)
# define WOLFBOOT_TPM_PARMENC /* used in this file to gate features */
# if defined(SIGN_ECC256) || defined(SIGN_ECC384) || defined(SIGN_ECC521)
# define HAVE_ECC_KEY_EXPORT
# endif
#endif

/* ED25519 and SHA512 */
Expand Down Expand Up @@ -103,21 +106,22 @@ extern int tolower(int c);


/* ECC options disabled to reduce size */
#ifndef WOLFCRYPT_SECURE_MODE
#if !defined(WOLFCRYPT_SECURE_MODE)
# define HAVE_ECC
# define NO_ECC_SIGN
# define NO_ECC_EXPORT
# define NO_ECC_KEY_EXPORT
# define NO_ASN
# if !defined(WOLFBOOT_TPM_PARMENC)
# define NO_ECC_SIGN
# define NO_ECC_EXPORT
# define NO_ECC_KEY_EXPORT
# endif
#else
# define HAVE_ECC_SIGN
//# define HAVE_ECC_CDH
# define HAVE_ECC_CDH
# define WOLFSSL_SP
# define WOLFSSL_SP_MATH
# define WOLFSSL_SP_SMALL
# define SP_WORD_SIZE 32
# define WOLFSSL_HAVE_SP_ECC
//# define WOLFSSL_SP_MATH_ALL
# define WOLFSSL_SP_MATH_ALL
# define WOLFSSL_KEY_GEN
# define HAVE_ECC_KEY_EXPORT

Expand Down Expand Up @@ -151,7 +155,6 @@ int hal_trng_get_entropy(unsigned char *out, unsigned len);
# endif
#endif
# define NO_RSA

#endif /* WOLFBOOT_SIGN_ECC521 || WOLFBOOT_SIGN_ECC384 || WOLFBOOT_SIGN_ECC256 */

#ifdef WOLFBOOT_SIGN_RSA2048
Expand Down Expand Up @@ -343,6 +346,7 @@ int hal_trng_get_entropy(unsigned char *out, unsigned len);
#define WC_NO_HASHDRBG
#define NO_DEV_RANDOM
#define NO_ECC_KEY_EXPORT
#define NO_ASN
#endif

#define NO_CMAC
Expand Down

0 comments on commit 18fd398

Please sign in to comment.