]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fixes #19580 ECX keygen
authorYuan, Shuai <shuai.yuan@intel.com>
Tue, 4 Apr 2023 05:42:38 +0000 (01:42 -0400)
committerPauli <pauli@openssl.org>
Wed, 12 Apr 2023 07:21:43 +0000 (17:21 +1000)
Signed-off-by: Yuan, Shuai <shuai.yuan@intel.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/20680)

crypto/ec/ecx_meth.c

index 45531b86a1efc86c037aafcaf58b3c1453966a91..81e0beb485a803183815bc4ff4e94f45a2eda0bd 100644 (file)
@@ -711,7 +711,7 @@ const EVP_PKEY_ASN1_METHOD ossl_ed448_asn1_meth = {
 static int pkey_ecx_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
 {
     ECX_KEY *ecx = ossl_ecx_key_op(NULL, NULL, 0, ctx->pmeth->pkey_id,
-                                   KEY_OP_PUBLIC, NULL, NULL);
+                                   KEY_OP_KEYGEN, NULL, NULL);
 
     if (ecx != NULL) {
         EVP_PKEY_assign(pkey, ctx->pmeth->pkey_id, ecx);