mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 12:44:45 +02:00
src/ssl.c: remove frivolous (void)heap to clear -Wdeclaration-after-statement.
wolfcrypt/src/aes.c: add NEED_AES_TABLES gate around AesSetKey_C() implementations (fixes WOLFSSL_KCAPI_AES builds, probably among others). wolfcrypt/src/sp_int.c: add missing casts to clear -Wconversions.
This commit is contained in:
@@ -30149,7 +30149,7 @@ static int set_curves_list(WOLFSSL* ssl, WOLFSSL_CTX *ctx, const char* names)
|
||||
char name[MAX_CURVE_NAME_SZ];
|
||||
byte groups_len = 0;
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
void *heap = ssl? ssl->heap : ctx ? ctx->heap : NULL; (void)heap;
|
||||
void *heap = ssl? ssl->heap : ctx ? ctx->heap : NULL;
|
||||
int *groups;
|
||||
#else
|
||||
int groups[WOLFSSL_MAX_GROUP_COUNT];
|
||||
|
@@ -3885,6 +3885,8 @@ static WARN_UNUSED_RESULT int wc_AesDecrypt(
|
||||
* and we need both HW and SW. */
|
||||
#ifdef NEED_SOFTWARE_AES_SETKEY
|
||||
|
||||
#ifdef NEED_AES_TABLES
|
||||
|
||||
#ifndef WC_AES_BITSLICED
|
||||
/* Set the AES key and expand.
|
||||
*
|
||||
@@ -4125,6 +4127,8 @@ static void AesSetKey_C(Aes* aes, const byte* key, word32 keySz, int dir)
|
||||
}
|
||||
#endif /* WC_AES_BITSLICED */
|
||||
|
||||
#endif /* NEED_AES_TABLES */
|
||||
|
||||
/* Software AES - SetKey */
|
||||
static WARN_UNUSED_RESULT int wc_AesSetKeyLocal(
|
||||
Aes* aes, const byte* userKey, word32 keylen, const byte* iv, int dir,
|
||||
|
@@ -7687,7 +7687,7 @@ static void sp_clamp_ct(sp_int* a)
|
||||
unsigned int used = a->used;
|
||||
unsigned int mask = (unsigned int)-1;
|
||||
|
||||
for (i = a->used-1; i >= 0; i--) {
|
||||
for (i = (int)a->used - 1; i >= 0; i--) {
|
||||
used -= ((unsigned int)(a->dp[i] == 0)) & mask;
|
||||
mask &= (unsigned int)0 - (a->dp[i] == 0);
|
||||
}
|
||||
@@ -17072,7 +17072,9 @@ static int _sp_mont_red(sp_int* a, const sp_int* m, sp_int_digit mp, int ct)
|
||||
}
|
||||
else {
|
||||
for (i = 0; i < m->used * 2; i++) {
|
||||
a->dp[i] &= (sp_int_digit)(sp_int_sdigit)ctMaskIntGTE(a->used-1, i);
|
||||
a->dp[i] &=
|
||||
(sp_int_digit)
|
||||
(sp_int_sdigit)ctMaskIntGTE((int)(a->used-1), (int)i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17195,7 +17197,9 @@ static int _sp_mont_red(sp_int* a, const sp_int* m, sp_int_digit mp, int ct)
|
||||
}
|
||||
else {
|
||||
for (i = 0; i < m->used * 2; i++) {
|
||||
a->dp[i] &= (sp_int_digit)(sp_int_sdigit)ctMaskIntGTE(a->used-1, i);
|
||||
a->dp[i] &=
|
||||
(sp_int_digit)
|
||||
(sp_int_sdigit)ctMaskIntGTE((int)(a->used-1), (int)i);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user