Fix evp SM cipherType

This commit is contained in:
gojimmypi
2023-11-16 13:38:39 -08:00
parent 6945093221
commit 4c6c2942b1

View File

@ -6040,7 +6040,7 @@ void wolfSSL_EVP_init(void)
else else
#endif /* HAVE_CHACHA && HAVE_POLY1305 */ #endif /* HAVE_CHACHA && HAVE_POLY1305 */
#if defined(WOLFSSL_SM4_GCM) #if defined(WOLFSSL_SM4_GCM)
if (ctx->cipherType == WOLFSSL_SM4_GCM) { if (ctx->cipherType == SM4_GCM_TYPE) {
if (arg <= 0 || arg > SM4_BLOCK_SIZE) { if (arg <= 0 || arg > SM4_BLOCK_SIZE) {
break; break;
} }
@ -6048,7 +6048,7 @@ void wolfSSL_EVP_init(void)
else else
#endif #endif
#if defined(WOLFSSL_SM4_CCM) #if defined(WOLFSSL_SM4_CCM)
if (ctx->cipherType == WOLFSSL_SM4_CCM) { if (ctx->cipherType == SM4_CCM_TYPE) {
if (arg <= 0 || arg > SM4_BLOCK_SIZE) { if (arg <= 0 || arg > SM4_BLOCK_SIZE) {
break; break;
} }