[PATCH] crypto/openssl: fix SM2 encryption output length

Akhil Goyal gakhil at marvell.com
Mon Nov 9 21:04:19 CET 2026


> Acked-by: Kai Ji <kai.ji at intel.com>
> 
> 
> From: Sun Yuechi <sunyuechi at iscas.ac.cn>
> Sent: Monday, October 26, 2026 14:16
> To: Ji, Kai <kai.ji at intel.com>; Akhil Goyal <gakhil at marvell.com>; Gowrishankar
> Muthukrishnan <gmuthukrishn at marvell.com>
> Cc: dev at dpdk.org <dev at dpdk.org>; Sun Yuechi <sunyuechi at iscas.ac.cn>;
> stable at dpdk.org <stable at dpdk.org>
> Subject: [PATCH] crypto/openssl: fix SM2 encryption output length
> 
> SM2 encryption passed a zero output length to EVP_PKEY_encrypt(),
> which OpenSSL 3.6.3 and later reject as "buffer too small".
> Query the required length first, as the RSA path does.
> 
> Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2")
> Cc: stable at dpdk.org
> Signed-off-by: Sun Yuechi <sunyuechi at iscas.ac.cn>
Applied to dpdk-next-crypto
Thanks


More information about the dev mailing list