Skip to content

Commit

Permalink
libtomcrypt: define LTC_MPI at the same time as LTC_DER
Browse files Browse the repository at this point in the history
LTC_DER is always defined when LTC_NO_PKCS is NOT defined (which is our
case). Since LTC_DER depends on LTC_MPI let's set that one at the same
time. Fixes the following build error:

 $ make CFG_CRYPTO=n
 [...]
 core/lib/libtomcrypt/src/headers/tomcrypt_custom.h:629:5: error: #error ASN.1 DER requires MPI functionality
   629 |    #error ASN.1 DER requires MPI functionality
       |     ^~~~~

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
jforissier authored and jenswi-linaro committed Apr 24, 2024
1 parent e8f42d8 commit eba1524
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/lib/libtomcrypt/src/headers/tomcrypt_custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@
/* Include ASN.1 DER (required by DSA/RSA) */
#define LTC_DER

#define LTC_MPI

#endif /* LTC_NO_PKCS */

/* misc stuff */
Expand Down Expand Up @@ -574,9 +576,6 @@
#endif

#if defined(LTC_MECC) || defined(LTC_MRSA) || defined(LTC_MDSA) || defined(LTC_SSH)
/* Include the MPI functionality? (required by the PK algorithms) */
#define LTC_MPI

#ifndef LTC_PK_MAX_RETRIES
/* iterations limit for retry-loops */
#define LTC_PK_MAX_RETRIES 20
Expand Down

0 comments on commit eba1524

Please sign in to comment.