From 1d16af4f329278661f7a2cf7481cf2d551625abe Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Wed, 24 Feb 2021 09:08:15 -0600 Subject: [PATCH] Warnings and error fixes --- src/tls13.c | 4 ++-- wolfcrypt/src/aes.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tls13.c b/src/tls13.c index f8621977f..f2cbf9fd0 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -8132,7 +8132,7 @@ int wolfSSL_CTX_set_groups(WOLFSSL_CTX* ctx, int* groups, int count) for (i = 0; i < count; i++) { /* Call to wolfSSL_CTX_UseSupportedCurve also checks if input groups * are valid */ - if ((ret = wolfSSL_CTX_UseSupportedCurve(ctx, groups[i])) + if ((ret = wolfSSL_CTX_UseSupportedCurve(ctx, (word16)groups[i])) != WOLFSSL_SUCCESS) { TLSX_Remove(&ctx->extensions, TLSX_SUPPORTED_GROUPS, ctx->heap); return ret; @@ -8167,7 +8167,7 @@ int wolfSSL_set_groups(WOLFSSL* ssl, int* groups, int count) for (i = 0; i < count; i++) { /* Call to wolfSSL_UseSupportedCurve also checks if input groups * are valid */ - if ((ret = wolfSSL_UseSupportedCurve(ssl, groups[i])) + if ((ret = wolfSSL_UseSupportedCurve(ssl, (word16)groups[i])) != WOLFSSL_SUCCESS) { TLSX_Remove(&ssl->extensions, TLSX_SUPPORTED_GROUPS, ssl->heap); return ret; diff --git a/wolfcrypt/src/aes.c b/wolfcrypt/src/aes.c index dcc1187af..b08a5c69f 100644 --- a/wolfcrypt/src/aes.c +++ b/wolfcrypt/src/aes.c @@ -4798,7 +4798,7 @@ static void AES_GCM_encrypt(const unsigned char *in, unsigned char *out, const unsigned char* addt, const unsigned char* ivec, unsigned char *tag, word32 nbytes, word32 abytes, word32 ibytes, - wrd32 tbytes, const unsigned char* key, int nr) + word32 tbytes, const unsigned char* key, int nr) { int i, j ,k; __m128i ctr1;