From 8e57ff08ab8427ae69c66b2e2b5c6f867f9df355 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Fri, 3 Feb 2023 16:09:27 -0800 Subject: [PATCH] Build Fixes ./configure --enable-wolfssh --enable-cryptonly \ --disable-asn --disable-rsa --disable-ecc ./configure --disable-asn --disable-rsa --disable-ecc --enable-psk ./configure --enable-cryptonly --disable-asn --disable-rsa --disable-ecc 1. Fails compiling the KDF file, can't find c32toa inline function. 2. In configure, move the check for ECC when ASN is disabled up to the other ASN checks. It also needs to be checked with cryptonly is disabled. --- configure.ac | 10 +++++----- wolfssl/wolfcrypt/settings.h | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index add30560c..a9ba3263b 100644 --- a/configure.ac +++ b/configure.ac @@ -3956,6 +3956,11 @@ then AC_MSG_ERROR([please disable dsa if disabling asn.]) fi +if test "x$ENABLED_ECC" != "xno" && test "x$ENABLED_ASN" = "xno" +then + AC_MSG_ERROR([please disable ecc if disabling asn.]) +fi + # No Big Int (ASN, DSA, RSA, DH and ECC need bigint) if test "$ENABLED_ASN" = "no" && test "$ENABLED_DSA" = "no" && \ test "$ENABLED_DH" = "no" && test "$ENABLED_ECC" = "no" && \ @@ -6289,11 +6294,6 @@ then AC_MSG_ERROR([please enable psk if disabling asn.]) fi - if test "x$ENABLED_ECC" != "xno" && test "x$ENABLED_ASN" = "xno" - then - AC_MSG_ERROR([please disable ecc if disabling asn.]) - fi - if test "$ENABLED_AFALG" = "yes" then # for TLS connections the intermediate hash needs to store buffer diff --git a/wolfssl/wolfcrypt/settings.h b/wolfssl/wolfcrypt/settings.h index 702d5b36d..8bb3d87f7 100644 --- a/wolfssl/wolfcrypt/settings.h +++ b/wolfssl/wolfcrypt/settings.h @@ -2605,9 +2605,12 @@ extern void uITRON4_free(void *p) ; #define WOLFSSL_NO_XOR_OPS #endif -#if defined(NO_ASN) && defined(WOLFCRYPT_ONLY) +#if defined(NO_ASN) && defined(WOLFCRYPT_ONLY) && !defined(WOLFSSL_WOLFSSH) #undef WOLFSSL_NO_INT_ENCODE #define WOLFSSL_NO_INT_ENCODE +#endif + +#if defined(NO_ASN) && defined(WOLFCRYPT_ONLY) #undef WOLFSSL_NO_INT_DECODE #define WOLFSSL_NO_INT_DECODE #endif