From: lan1120 Date: Tue, 2 Dec 2025 01:36:57 +0000 (+0800) Subject: mlx_kem_dup(): Set key state to MLX_HAVE_NOKEYS when not copying keypair X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc06a6c96c8707503b6fb0dd2e8f12d08c43d1a8;p=thirdparty%2Fopenssl.git mlx_kem_dup(): Set key state to MLX_HAVE_NOKEYS when not copying keypair Reviewed-by: Viktor Dukhovni Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/29280) --- diff --git a/providers/implementations/keymgmt/mlx_kmgmt.c b/providers/implementations/keymgmt/mlx_kmgmt.c index e8fd93cbf06..e27f6a2c87c 100644 --- a/providers/implementations/keymgmt/mlx_kmgmt.c +++ b/providers/implementations/keymgmt/mlx_kmgmt.c @@ -731,6 +731,7 @@ static void *mlx_kem_dup(const void *vkey, int selection) switch (selection & OSSL_KEYMGMT_SELECT_KEYPAIR) { case 0: ret->xkey = ret->mkey = NULL; + ret->state = MLX_HAVE_NOKEYS; return ret; case OSSL_KEYMGMT_SELECT_KEYPAIR: ret->mkey = EVP_PKEY_dup(key->mkey);