]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Use EC_POINT_[sg]et_affine_coordinates()
authortb@openbsd.org <tb@openbsd.org>
Mon, 12 May 2025 05:41:20 +0000 (05:41 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Tue, 20 May 2025 08:03:19 +0000 (18:03 +1000)
It is available in all supported OpenSSL flavors/versions and the _GFp
variants will be removed from LibreSSL.

ok hshoexer jsing

OpenBSD-Commit-ID: ecedca0e1ffa80e0c9ef7c787bc6a972882c596b

sk-usbhid.c
sshkey.c

index 427431b9a4575ba77e873a54cc6aa910b71fb485..e2fa0b499af641b468fb58291c39ef3f79ee33ba 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: sk-usbhid.c,v 1.47 2024/12/03 08:31:49 djm Exp $ */
+/* $OpenBSD: sk-usbhid.c,v 1.48 2025/05/12 05:41:20 tb Exp $ */
 /*
  * Copyright (c) 2019 Markus Friedl
  * Copyright (c) 2020 Pedro Martelletto
@@ -636,8 +636,8 @@ pack_public_key_ecdsa(const fido_cred_t *cred,
                skdebug(__func__, "BN_bin2bn failed");
                goto out;
        }
-       if (EC_POINT_set_affine_coordinates_GFp(g, q, x, y, NULL) != 1) {
-               skdebug(__func__, "EC_POINT_set_affine_coordinates_GFp failed");
+       if (EC_POINT_set_affine_coordinates(g, q, x, y, NULL) != 1) {
+               skdebug(__func__, "EC_POINT_set_affine_coordinates failed");
                goto out;
        }
        response->public_key_len = EC_POINT_point2oct(g, q,
index 55a156818962ee20e40f72a33b71916ed4bb3dd9..9e31411e21d6d84116e5c7a41e762b26b7f28838 100644 (file)
--- a/sshkey.c
+++ b/sshkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshkey.c,v 1.149 2025/05/06 05:40:56 djm Exp $ */
+/* $OpenBSD: sshkey.c,v 1.150 2025/05/12 05:41:20 tb Exp $ */
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
  * Copyright (c) 2008 Alexander von Gernler.  All rights reserved.
@@ -2707,8 +2707,7 @@ sshkey_ec_validate_public(const EC_GROUP *group, const EC_POINT *public)
 
        /* log2(x) > log2(order)/2, log2(y) > log2(order)/2 */
        if (EC_GROUP_get_order(group, order, NULL) != 1 ||
-           EC_POINT_get_affine_coordinates_GFp(group, public,
-           x, y, NULL) != 1) {
+           EC_POINT_get_affine_coordinates(group, public, x, y, NULL) != 1) {
                ret = SSH_ERR_LIBCRYPTO_ERROR;
                goto out;
        }
@@ -2792,9 +2791,8 @@ sshkey_dump_ec_point(const EC_GROUP *group, const EC_POINT *point)
                fprintf(stderr, "%s: BN_new failed\n", __func__);
                goto out;
        }
-       if (EC_POINT_get_affine_coordinates_GFp(group, point,
-           x, y, NULL) != 1) {
-               fprintf(stderr, "%s: EC_POINT_get_affine_coordinates_GFp\n",
+       if (EC_POINT_get_affine_coordinates(group, point, x, y, NULL) != 1) {
+               fprintf(stderr, "%s: EC_POINT_get_affine_coordinates\n",
                    __func__);
                goto out;
        }