Skip to content

Commit 391431c

Browse files
authored
Merge pull request #7539 from bandi13/fixConversionPart2
Fix conversion part2
2 parents 7782f8e + 412447a commit 391431c

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

configure.ac

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ else
100100
REPRODUCIBLE_BUILD_DEFAULT=no
101101
fi
102102

103+
# Fail when an option is passed that is not recognized
104+
m4_divert_once([DEFAULTS], [enable_option_checking=fatal])
105+
103106
# Allow experimental settings
104107
AC_ARG_ENABLE([experimental],
105108
[AS_HELP_STRING([--enable-experimental],[Allow experimental settings in the configuration (default: disabled)])],
@@ -3757,13 +3760,13 @@ then
37573760
fi
37583761

37593762
# ECC Minimum Key Size
3760-
ENABLED_ECCMINSZ=224
37613763
AC_ARG_WITH([eccminsz],
37623764
[AS_HELP_STRING([--with-eccminsz=BITS],[Sets the ECC minimum key size (default: 224 bits)])],
37633765
[
37643766
ENABLED_ECCMINSZ=$withval
37653767
AM_CFLAGS="$AM_CFLAGS -DECC_MIN_KEY_SZ=$withval"
3766-
]
3768+
],
3769+
[ ENABLED_ECCMINSZ=224 ]
37673770
)
37683771

37693772
# Compressed Key
@@ -8324,7 +8327,7 @@ fi
83248327
AC_ARG_WITH([max-ecc-bits],
83258328
[AS_HELP_STRING([--with-max-ecc-bits=number],[number of bits to support for ECC algorithms])],
83268329
[WITH_MAX_ECC_BITS=$withval],
8327-
[WITH_MAX_ECC_BITS="$DEFAULT_MAX_ECC_BITS"])
8330+
)
83288331
83298332
if test -n "$WITH_MAX_ECC_BITS"; then
83308333
if test "$WITH_MAX_ECC_BITS" -lt 112 -o "$WITH_MAX_ECC_BITS" -gt 1024; then
@@ -10044,3 +10047,10 @@ if test "$MINGW_LIB_WARNING" = "yes"
1004410047
then
1004510048
AC_MSG_WARN([Building with shared and static library at the same time on this system may cause export/import problems when using non contemporary GNU tools.])
1004610049
fi
10050+
10051+
if test -n "$WITH_MAX_ECC_BITS"; then
10052+
if test "$WITH_MAX_ECC_BITS" -lt "$ENABLED_ECCMINSZ"; then
10053+
AC_MSG_ERROR([--with-max-ecc-bits argument ($WITH_MAX_ECC_BITS) must be greater than --with-eccminsz argument ($ENABLED_ECCMINSZ)])
10054+
fi
10055+
fi
10056+

wolfcrypt/src/kdf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ int wc_PRF_TLS(byte* digest, word32 digLen, const byte* secret, word32 secLen,
571571
(void)heap;
572572
/* okmLen (2) + protocol|label len (1) + info len(1) + protocollen +
573573
* labellen + infolen */
574-
len = (size_t)4 + protocolLen + labelLen + infoLen;
574+
len = 4U + protocolLen + labelLen + infoLen;
575575

576576
data = (byte*)XMALLOC(len, heap, DYNAMIC_TYPE_TMP_BUFFER);
577577
if (data == NULL)

0 commit comments

Comments
 (0)