wolfcrypt/src/sp_int.c. src/ssl_asn1.c. src/internal.c: rename several declarations to avoid shadowing global functions, for the convenience of obsolete (pre-4v8) gcc -Wshadow.

pull/8522/head
Daniel Pouzzner 2025-02-28 15:29:58 -06:00
parent f7b911f5cd
commit 50a3be6df7
3 changed files with 17 additions and 17 deletions

View File

@ -25346,12 +25346,12 @@ int SendAsyncData(WOLFSSL* ssl)
* 2 in SCR and we have plain data ready
* Early data logic may bypass this logic in TLSv1.3 when appropriate.
*/
static int ssl_in_handshake(WOLFSSL *ssl, int send)
static int ssl_in_handshake(WOLFSSL *ssl, int sending_data)
{
int SendAsyncData = 1;
(void)SendAsyncData;
if (IsSCR(ssl)) {
if (send) {
if (sending_data) {
/* allow sending data in SCR */
return 0;
} else {

View File

@ -1093,36 +1093,36 @@ static int wolfssl_asn1_integer_require_len(WOLFSSL_ASN1_INTEGER* a, int len,
*/
WOLFSSL_ASN1_INTEGER* wolfSSL_ASN1_INTEGER_dup(const WOLFSSL_ASN1_INTEGER* src)
{
WOLFSSL_ASN1_INTEGER* dup = NULL;
WOLFSSL_ASN1_INTEGER* dst = NULL;
WOLFSSL_ENTER("wolfSSL_ASN1_INTEGER_dup");
/* Check for object to duplicate. */
/* Check for object to dstlicate. */
if (src != NULL) {
/* Create a new ASN.1 INTEGER object to be copied into. */
dup = wolfSSL_ASN1_INTEGER_new();
dst = wolfSSL_ASN1_INTEGER_new();
}
/* Check for object to copy into. */
if (dup != NULL) {
if (dst != NULL) {
/* Copy simple fields. */
dup->length = src->length;
dup->negative = src->negative;
dup->type = src->type;
dst->length = src->length;
dst->negative = src->negative;
dst->type = src->type;
if (!src->isDynamic) {
/* Copy over data from/to fixed buffer. */
XMEMCPY(dup->intData, src->intData, WOLFSSL_ASN1_INTEGER_MAX);
XMEMCPY(dst->intData, src->intData, WOLFSSL_ASN1_INTEGER_MAX);
}
else if (wolfssl_asn1_integer_require_len(dup, src->length, 0) == 0) {
wolfSSL_ASN1_INTEGER_free(dup);
dup = NULL;
else if (wolfssl_asn1_integer_require_len(dst, src->length, 0) == 0) {
wolfSSL_ASN1_INTEGER_free(dst);
dst = NULL;
}
else {
XMEMCPY(dup->data, src->data, (size_t)src->length);
XMEMCPY(dst->data, src->data, (size_t)src->length);
}
}
return dup;
return dst;
}
#endif /* OPENSSL_EXTRA || WOLFSSL_WPAS_SMALL */

View File

@ -8216,7 +8216,7 @@ int sp_addmod_ct(const sp_int* a, const sp_int* b, const sp_int* m, sp_int* r)
* @return MP_OKAY on success.
*/
static void _sp_submod_ct(const sp_int* a, const sp_int* b, const sp_int* m,
unsigned int max, sp_int* r)
unsigned int max_size, sp_int* r)
{
#ifndef SQR_MUL_ASM
sp_int_sword w;
@ -8237,7 +8237,7 @@ static void _sp_submod_ct(const sp_int* a, const sp_int* b, const sp_int* m,
l = 0;
h = 0;
#endif
for (i = 0; i < max; i++) {
for (i = 0; i < max_size; i++) {
/* Values past 'used' are not initialized. */
mask_a += (i == a->used);
mask_b += (i == b->used);