From 628a91efda35d9ff5f29262a668981391d6b8da8 Mon Sep 17 00:00:00 2001 From: David Garske Date: Mon, 2 May 2022 16:06:18 -0700 Subject: [PATCH] Fix for size calculation for encrypt then mac without openssl extra enabled. Fix for cast warning. --- src/internal.c | 6 +++--- src/ssl.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/internal.c b/src/internal.c index 34401e6dc..6458eac18 100644 --- a/src/internal.c +++ b/src/internal.c @@ -18320,10 +18320,10 @@ int BuildMessage(WOLFSSL* ssl, byte* output, int outSz, const byte* input, } else #endif + { args->pad = (args->sz - args->headerSz) % blockSz; - #ifdef OPENSSL_EXTRA - if(args->pad != 0) - #endif + } + if (args->pad != 0) args->pad = blockSz - args->pad; args->sz += args->pad; } diff --git a/src/ssl.c b/src/ssl.c index 02eb7ec46..5260c1155 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -37749,7 +37749,7 @@ int wolfSSL_ASN1_STRING_canon(WOLFSSL_ASN1_STRING* asn_out, ret = len; } - WOLFSSL_LEAVE("wolfSSL_OBJ_length", ret); + WOLFSSL_LEAVE("wolfSSL_OBJ_length", (int)ret); return ret; }