The EC_KEY method should use the EC_KEY index, not RSA
authortb <tb@openbsd.org>
Sat, 3 Aug 2024 13:06:37 +0000 (13:06 +0000)
committertb <tb@openbsd.org>
Sat, 3 Aug 2024 13:06:37 +0000 (13:06 +0000)
Unbreaks ssh's t-agent-pkcs11-cert regress reported by anton.

ok jsing

lib/libcrypto/ec/ec_kmeth.c

index 856afc8..fa79b9a 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ec_kmeth.c,v 1.13 2023/11/19 15:46:09 tb Exp $        */
+/*     $OpenBSD: ec_kmeth.c,v 1.14 2024/08/03 13:06:37 tb Exp $        */
 /*
  * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project.
@@ -149,7 +149,7 @@ EC_KEY_new_method(ENGINE *engine)
        ret->conv_form = POINT_CONVERSION_UNCOMPRESSED;
        ret->references = 1;
 
-       if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_RSA, ret, &ret->ex_data))
+       if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_EC_KEY, ret, &ret->ex_data))
                goto err;
        if (ret->meth->init != NULL && ret->meth->init(ret) == 0)
                goto err;