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-Tag: 3.6-PRE-CLANG-FORMAT-WEBKIT~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47716f210510276ca73dbd4d05bbf38aeb558e63;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) (cherry picked from commit bc06a6c96c8707503b6fb0dd2e8f12d08c43d1a8) --- diff --git a/providers/implementations/keymgmt/mlx_kmgmt.c.in b/providers/implementations/keymgmt/mlx_kmgmt.c.in index b52bd343df8..aa80bd243d6 100644 --- a/providers/implementations/keymgmt/mlx_kmgmt.c.in +++ b/providers/implementations/keymgmt/mlx_kmgmt.c.in @@ -757,6 +757,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);