Skip to content

Commit beeda7b

Browse files
Merge pull request #8100 from douzzer/20241022-cleanups
20241022-cleanups
2 parents 43fe46c + ea491b8 commit beeda7b

File tree

6 files changed

+15
-13
lines changed

6 files changed

+15
-13
lines changed

configure.ac

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -573,16 +573,15 @@ then
573573
AM_CFLAGS="$AM_CFLAGS -ffile-prefix-map=\$(abs_top_srcdir)/= -ffile-prefix-map=\$(top_srcdir)/="
574574
fi
575575

576-
# opportunistically use linker option --build-id=none
577-
578-
if "$CC" -Wl,--build-id=none -x c - -o /dev/null >/dev/null 2>&1 <<' EOF'
576+
# opportunistically force linker option --build-id=sha1 (usually the default)
577+
if "$CC" -Wl,--build-id=sha1 -x c - -o /dev/null >/dev/null 2>&1 <<' EOF'
579578
#include <stdlib.h>
580579
int main(int argc, char **argv) {
581580
(void)argc; (void)argv; return 0;
582581
}
583582
EOF
584583
then
585-
AM_LDFLAGS="$AM_LDFLAGS -Wl,--build-id=none"
584+
AM_LDFLAGS="$AM_LDFLAGS -Wl,--build-id=sha1"
586585
fi
587586
fi
588587

@@ -1156,7 +1155,8 @@ then
11561155
test "$enable_dsa" = "" && test "$enable_sha" != "no" && enable_dsa=yes
11571156
if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -le 5; then
11581157
test "$enable_ecccustcurves" = "" && enable_ecccustcurves=yes
1159-
test "$enable_brainpool" = "" && enable_brainpool=yes
1158+
test "$enable_ecccustcurves" != "no" && test "$enable_brainpool" = "" && enable_brainpool=yes
1159+
test "$enable_ecccustcurves" != "no" && AM_CFLAGS="$AM_CFLAGS -DHAVE_ECC_CDH -DHAVE_ECC_KOBLITZ -DHAVE_ECC_SECPR2 -DHAVE_ECC_SECPR3"
11601160
fi
11611161
test "$enable_srp" = "" && enable_srp=yes
11621162
fi
@@ -1195,6 +1195,7 @@ then
11951195

11961196
if test "$ENABLED_FIPS" = "no" || test "$HAVE_FIPS_VERSION" -le 5; then
11971197
test "$enable_des3" = "" && enable_des3=yes
1198+
test "$enable_des3" != "no" && AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_DES_ECB"
11981199
fi
11991200

12001201
AM_CFLAGS="$AM_CFLAGS -DHAVE_AES_DECRYPT -DHAVE_AES_ECB -DWOLFSSL_ALT_NAMES"

src/ssl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15108,7 +15108,7 @@ static WC_INLINE const char* wolfssl_mac_to_string(int mac)
1510815108
macStr = "SHA1";
1510915109
break;
1511015110
#endif
15111-
#ifdef HAVE_SHA224
15111+
#ifdef WOLFSSL_SHA224
1511215112
case sha224_mac:
1511315113
macStr = "SHA224";
1511415114
break;
@@ -15118,12 +15118,12 @@ static WC_INLINE const char* wolfssl_mac_to_string(int mac)
1511815118
macStr = "SHA256";
1511915119
break;
1512015120
#endif
15121-
#ifdef HAVE_SHA384
15121+
#ifdef WOLFSSL_SHA384
1512215122
case sha384_mac:
1512315123
macStr = "SHA384";
1512415124
break;
1512515125
#endif
15126-
#ifdef HAVE_SHA512
15126+
#ifdef WOLFSSL_SHA512
1512715127
case sha512_mac:
1512815128
macStr = "SHA512";
1512915129
break;

tests/api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68600,7 +68600,7 @@ static int test_GENERAL_NAME_set0_othername(void) {
6860068600
/* Note the lack of wolfSSL_ prefix...this is a compatibility layer test. */
6860168601
static int test_othername_and_SID_ext(void) {
6860268602
EXPECT_DECLS;
68603-
#if defined(OPENSSL_EXTRA) && !defined(NO_CERTS) && \
68603+
#if defined(OPENSSL_ALL) && !defined(NO_CERTS) && \
6860468604
defined(WOLFSSL_CERT_GEN) && defined(WOLFSSL_CERT_REQ) && \
6860568605
defined(WOLFSSL_CUSTOM_OID) && defined(WOLFSSL_ALT_NAMES) && \
6860668606
defined(WOLFSSL_CERT_EXT) && !defined(NO_FILESYSTEM) && \

wolfcrypt/src/asn.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30198,7 +30198,7 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
3019830198

3019930199
case CERTSIGN_STATE_DO:
3020030200
certSignCtx->state = CERTSIGN_STATE_DO;
30201-
ret = ALGO_ID_E; /* default to error */
30201+
ret = -1; /* default to error, reassigned to ALGO_ID_E below. */
3020230202

3020330203
#ifndef NO_RSA
3020430204
if (rsaKey) {
@@ -30281,6 +30281,9 @@ static int MakeSignature(CertSignCtx* certSignCtx, const byte* buf, word32 sz,
3028130281
}
3028230282
#endif /* HAVE_SPHINCS */
3028330283

30284+
if (ret == -1)
30285+
ret = ALGO_ID_E;
30286+
3028430287
break;
3028530288
}
3028630289

wolfcrypt/src/ecc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4554,13 +4554,11 @@ int wc_ecc_get_curve_id_from_oid(const byte* oid, word32 len)
45544554
}
45554555
#endif
45564556

4557-
#if !defined(HAVE_OID_ENCODING) && !defined(HAVE_OID_DECODING)
45584557
if (len == 0) {
45594558
/* SAKKE has zero oidSz and will otherwise match with len==0. */
45604559
WOLFSSL_MSG("zero oidSz");
45614560
return ECC_CURVE_INVALID;
45624561
}
4563-
#endif
45644562

45654563
for (curve_idx = 0; ecc_sets[curve_idx].size != 0; curve_idx++) {
45664564
#if defined(HAVE_OID_ENCODING) && !defined(HAVE_OID_DECODING)

wolfssl/wolfcrypt/settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ extern void uITRON4_free(void *p) ;
14811481
#ifndef NO_WRITEV
14821482
#define NO_WRITEV
14831483
#endif
1484-
#ifndef HAVE_SHA512
1484+
#ifndef WOLFSSL_SHA512
14851485
#ifndef NO_SHA512
14861486
#define NO_SHA512
14871487
#endif

0 commit comments

Comments
 (0)