From 4b30f47e9bb245bd37ffc6d07bf8b2fe8ee9188e Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Fri, 16 Sep 2022 15:25:28 -0500 Subject: [PATCH] Fix casts in evp.c and build issue in ParseCRL --- wolfcrypt/src/asn.c | 4 ++-- wolfcrypt/src/evp.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 4a3569a7e..f1a08dee7 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -36359,7 +36359,7 @@ end: } if (ret == 0) { #endif -#if defined(OPENSSL_EXTRA) + #ifdef OPENSSL_EXTRA /* Parse and store the issuer name. */ dcrl->issuerSz = GetASNItem_Length(dataASN[CRLASN_IDX_TBS_ISSUER], buff); @@ -36372,7 +36372,7 @@ end: if (ret < 0) { ret = ASN_PARSE_E; } -#endif + #endif } if ((ret == 0) && (dataASN[CRLASN_IDX_TBS_REVOKEDCERTS].tag != 0)) { diff --git a/wolfcrypt/src/evp.c b/wolfcrypt/src/evp.c index 4fc934336..528418608 100644 --- a/wolfcrypt/src/evp.c +++ b/wolfcrypt/src/evp.c @@ -6779,8 +6779,8 @@ int wolfSSL_EVP_MD_type(const WOLFSSL_EVP_MD* type) * combines them to a new iv. EVP is given exactly *one* iv, * so to pass it into chacha, we have to revert that first. * The counter comes first in little-endian */ - word32 counter = (uint32_t)iv[0] + (uint32_t)(iv[1] << 8) + - (uint32_t)(iv[2] << 16) + (uint32_t)(iv[3] << 24); + word32 counter = (word32)iv[0] + (word32)(iv[1] << 8) + + (word32)(iv[2] << 16) + (word32)(iv[3] << 24); if (wc_Chacha_SetIV(&ctx->cipher.chacha, iv + sizeof(counter), counter) != 0) {