fix: add CFB128 and OFB cases to wolfSSL_EVP_get_cipherbynid

The iv_length test used EVP_get_cipherbynid(NID_aes_128_cfb128) which
returned NULL because the switch had no CFB128 or OFB cases, causing
a segfault in EVP_CIPHER_iv_length(NULL).
This commit is contained in:
Mark Atwood
2026-04-30 13:57:51 -07:00
parent 58d3d84280
commit f9d6a0339f
+28
View File
@@ -5674,6 +5674,34 @@ const WOLFSSL_EVP_CIPHER *wolfSSL_EVP_get_cipherbynid(int id)
return wolfSSL_EVP_aes_256_ccm();
#endif
#endif
#ifdef WOLFSSL_AES_OFB
#ifdef WOLFSSL_AES_128
case WC_NID_aes_128_ofb:
return wolfSSL_EVP_aes_128_ofb();
#endif
#ifdef WOLFSSL_AES_192
case WC_NID_aes_192_ofb:
return wolfSSL_EVP_aes_192_ofb();
#endif
#ifdef WOLFSSL_AES_256
case WC_NID_aes_256_ofb:
return wolfSSL_EVP_aes_256_ofb();
#endif
#endif /* WOLFSSL_AES_OFB */
#ifdef WOLFSSL_AES_CFB
#ifdef WOLFSSL_AES_128
case WC_NID_aes_128_cfb128:
return wolfSSL_EVP_aes_128_cfb128();
#endif
#ifdef WOLFSSL_AES_192
case WC_NID_aes_192_cfb128:
return wolfSSL_EVP_aes_192_cfb128();
#endif
#ifdef WOLFSSL_AES_256
case WC_NID_aes_256_cfb128:
return wolfSSL_EVP_aes_256_cfb128();
#endif
#endif /* WOLFSSL_AES_CFB */
#endif
#ifdef HAVE_ARIA