Merge pull request #8100 from douzzer/20241022-cleanups

20241022-cleanups
This commit is contained in:
JacobBarthelmeh
2024-10-23 10:08:57 -06:00
committed by GitHub
6 changed files with 15 additions and 13 deletions

View File

@ -573,16 +573,15 @@ then
AM_CFLAGS="$AM_CFLAGS -ffile-prefix-map=\$(abs_top_srcdir)/= -ffile-prefix-map=\$(top_srcdir)/=" AM_CFLAGS="$AM_CFLAGS -ffile-prefix-map=\$(abs_top_srcdir)/= -ffile-prefix-map=\$(top_srcdir)/="
fi fi
# opportunistically use linker option --build-id=none # opportunistically force linker option --build-id=sha1 (usually the default)
if "$CC" -Wl,--build-id=sha1 -x c - -o /dev/null >/dev/null 2>&1 <<' EOF'
if "$CC" -Wl,--build-id=none -x c - -o /dev/null >/dev/null 2>&1 <<' EOF'
#include <stdlib.h> #include <stdlib.h>
int main(int argc, char **argv) { int main(int argc, char **argv) {
(void)argc; (void)argv; return 0; (void)argc; (void)argv; return 0;
} }
EOF EOF
then then
AM_LDFLAGS="$AM_LDFLAGS -Wl,--build-id=none" AM_LDFLAGS="$AM_LDFLAGS -Wl,--build-id=sha1"
fi fi
fi fi
@ -1156,7 +1155,8 @@ then
test "$enable_dsa" = "" && test "$enable_sha" != "no" && enable_dsa=yes test "$enable_dsa" = "" && test "$enable_sha" != "no" && enable_dsa=yes
if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -le 5; then if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -le 5; then
test "$enable_ecccustcurves" = "" && enable_ecccustcurves=yes test "$enable_ecccustcurves" = "" && enable_ecccustcurves=yes
test "$enable_brainpool" = "" && enable_brainpool=yes test "$enable_ecccustcurves" != "no" && test "$enable_brainpool" = "" && enable_brainpool=yes
test "$enable_ecccustcurves" != "no" && AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_CDH -DHAVE_ECC_KOBLITZ -DHAVE_ECC_SECPR2 -DHAVE_ECC_SECPR3"
fi fi
test "$enable_srp" = "" && enable_srp=yes test "$enable_srp" = "" && enable_srp=yes
fi fi
@ -1195,6 +1195,7 @@ then
if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -le 5; then if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -le 5; then
test "$enable_des3" = "" && enable_des3=yes test "$enable_des3" = "" && enable_des3=yes
test "$enable_des3" != "no" && AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DES_ECB"
fi fi
AM_CFLAGS="$AM_CFLAGS -DHAVE_AES_DECRYPT -DHAVE_AES_ECB -DWOLFSSL_ALT_NAMES" AM_CFLAGS="$AM_CFLAGS -DHAVE_AES_DECRYPT -DHAVE_AES_ECB -DWOLFSSL_ALT_NAMES"

View File

@ -15108,7 +15108,7 @@ static WC_INLINE const char* wolfssl_mac_to_string(int mac)
macStr = "SHA1"; macStr = "SHA1";
break; break;
#endif #endif
#ifdef HAVE_SHA224 #ifdef WOLFSSL_SHA224
case sha224_mac: case sha224_mac:
macStr = "SHA224"; macStr = "SHA224";
break; break;
@ -15118,12 +15118,12 @@ static WC_INLINE const char* wolfssl_mac_to_string(int mac)
macStr = "SHA256"; macStr = "SHA256";
break; break;
#endif #endif
#ifdef HAVE_SHA384 #ifdef WOLFSSL_SHA384
case sha384_mac: case sha384_mac:
macStr = "SHA384"; macStr = "SHA384";
break; break;
#endif #endif
#ifdef HAVE_SHA512 #ifdef WOLFSSL_SHA512
case sha512_mac: case sha512_mac:
macStr = "SHA512"; macStr = "SHA512";
break; break;

View File

@ -68600,7 +68600,7 @@ static int test_GENERAL_NAME_set0_othername(void) {
/* Note the lack of wolfSSL_ prefix...this is a compatibility layer test. */ /* Note the lack of wolfSSL_ prefix...this is a compatibility layer test. */
static int test_othername_and_SID_ext(void) { static int test_othername_and_SID_ext(void) {
EXPECT_DECLS; EXPECT_DECLS;
#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS) && \ #if defined(OPENSSL_ALL) && !defined(NO_CERTS) && \
defined(WOLFSSL_CERT_GEN) && defined(WOLFSSL_CERT_REQ) && \ defined(WOLFSSL_CERT_GEN) && defined(WOLFSSL_CERT_REQ) && \
defined(WOLFSSL_CUSTOM_OID) && defined(WOLFSSL_ALT_NAMES) && \ defined(WOLFSSL_CUSTOM_OID) && defined(WOLFSSL_ALT_NAMES) && \
defined(WOLFSSL_CERT_EXT) && !defined(NO_FILESYSTEM) && \ defined(WOLFSSL_CERT_EXT) && !defined(NO_FILESYSTEM) && \

View File

@ -30198,7 +30198,7 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
case CERTSIGN_STATE_DO: case CERTSIGN_STATE_DO:
certSignCtx->state = CERTSIGN_STATE_DO; certSignCtx->state = CERTSIGN_STATE_DO;
ret = ALGO_ID_E; /* default to error */ ret = -1; /* default to error, reassigned to ALGO_ID_E below. */
#ifndef NO_RSA #ifndef NO_RSA
if (rsaKey) { if (rsaKey) {
@ -30281,6 +30281,9 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
} }
#endif /* HAVE_SPHINCS */ #endif /* HAVE_SPHINCS */
if (ret == -1)
ret = ALGO_ID_E;
break; break;
} }

View File

@ -4554,13 +4554,11 @@ int wc_ecc_get_curve_id_from_oid(const byte* oid, word32 len)
} }
#endif #endif
#if !defined(HAVE_OID_ENCODING) && !defined(HAVE_OID_DECODING)
if (len == 0) { if (len == 0) {
/* SAKKE has zero oidSz and will otherwise match with len==0. */ /* SAKKE has zero oidSz and will otherwise match with len==0. */
WOLFSSL_MSG("zero oidSz"); WOLFSSL_MSG("zero oidSz");
return ECC_CURVE_INVALID; return ECC_CURVE_INVALID;
} }
#endif
for (curve_idx = 0; ecc_sets[curve_idx].size != 0; curve_idx++) { for (curve_idx = 0; ecc_sets[curve_idx].size != 0; curve_idx++) {
#if defined(HAVE_OID_ENCODING) && !defined(HAVE_OID_DECODING) #if defined(HAVE_OID_ENCODING) && !defined(HAVE_OID_DECODING)

View File

@ -1481,7 +1481,7 @@ extern void uITRON4_free(void *p) ;
#ifndef NO_WRITEV #ifndef NO_WRITEV
#define NO_WRITEV #define NO_WRITEV
#endif #endif
#ifndef HAVE_SHA512 #ifndef WOLFSSL_SHA512
#ifndef NO_SHA512 #ifndef NO_SHA512
#define NO_SHA512 #define NO_SHA512
#endif #endif