From 16dba37ae682b3bc93a5985aeb5e6352305294d9 Mon Sep 17 00:00:00 2001 From: gojimmypi Date: Fri, 17 Nov 2023 07:56:56 -0800 Subject: [PATCH] fix wolfSSL_EVP_CIPHER_CTX_ctrl() SM GCM/CCM type --- src/ssl.c | 2 +- wolfcrypt/src/evp.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index 7af0aaa08..7845c4cfb 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -14682,7 +14682,7 @@ int AddSessionToCache(WOLFSSL_CTX* ctx, WOLFSSL_SESSION* addSession, cacheSession->ticketNonce.data = cacheSession->ticketNonce.dataStatic; cacheSession->ticketNonce.len = 0; } -#endif /* WOFLSSL_TLS13 && WOLFSSL_TICKET_NONCE_MALLOC && FIPS_VERSION_GE(5,3)*/ +#endif /* WOLFSSL_TLS13 && WOLFSSL_TICKET_NONCE_MALLOC && FIPS_VERSION_GE(5,3)*/ #endif #ifdef SESSION_CERTS if (overwrite && diff --git a/wolfcrypt/src/evp.c b/wolfcrypt/src/evp.c index 4f19975c4..f3ba308e4 100644 --- a/wolfcrypt/src/evp.c +++ b/wolfcrypt/src/evp.c @@ -5992,8 +5992,8 @@ void wolfSSL_EVP_init(void) } else #endif /* HAVE_CHACHA && HAVE_POLY1305 */ -#if defined(WOFLSSL_SM4_GCM) - if (ctx->cipherType == WOLFSSL_SM4_GCM) { +#if defined(WOLFSSL_SM4_GCM) + if (ctx->cipherType == SM4_GCM_TYPE) { if ((arg <= 0) || (arg > SM4_BLOCK_SIZE) || (ptr == NULL)) { break; } @@ -6005,8 +6005,8 @@ void wolfSSL_EVP_init(void) } else #endif -#if defined(WOFLSSL_SM4_CCM) - if (ctx->cipherType == WOLFSSL_SM4_CCM) { +#if defined(WOLFSSL_SM4_CCM) + if (ctx->cipherType == SM4_CCM_TYPE) { if ((arg <= 0) || (arg > SM4_BLOCK_SIZE) || (ptr == NULL)) { break; }