]> 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:42:02 +0000 (05:42 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Tue, 20 May 2025 08:07:26 +0000 (18:07 +1000)
It is available in all supported OpenSSL flavors/versions and the _GFp
variants will be removed from LibreSSL.

ok hshoexer jsing

OpenBSD-Regress-ID: 66cf1561e7b6c49002978f2d6720956f33a882f0

regress/misc/ssh-verify-attestation/ssh-verify-attestation.c
regress/unittests/sshbuf/test_sshbuf_getput_crypto.c

index 4d82a039058791f523652f66db340828fa754cd2..9316805e0cc5ecc8d700c872437fbd51196b76f8 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-verify-attestation.c,v 1.2 2024/12/06 10:37:42 djm Exp $ */
+/* $OpenBSD: ssh-verify-attestation.c,v 1.3 2025/05/12 05:42:02 tb Exp $ */
 /*
  * Copyright (c) 2022-2024 Damien Miller
  *
@@ -164,8 +164,8 @@ get_pubkey_from_cred_ecdsa(const fido_cred_t *cred, size_t *pubkey_len)
                error_f("BN_bin2bn failed");
                goto out;
        }
-       if (EC_POINT_set_affine_coordinates_GFp(g, q, x, y, NULL) != 1) {
-               error_f("EC_POINT_set_affine_coordinates_GFp failed");
+       if (EC_POINT_set_affine_coordinates(g, q, x, y, NULL) != 1) {
+               error_f("EC_POINT_set_affine_coordinates failed");
                goto out;
        }
        *pubkey_len = EC_POINT_point2oct(g, q,
index e3620e97fe991fbeee0519ab80547efde98522cb..48573ae82967190d7a9fd55e40307be344b56847 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: test_sshbuf_getput_crypto.c,v 1.3 2021/12/14 21:25:27 deraadt Exp $ */
+/*     $OpenBSD: test_sshbuf_getput_crypto.c,v 1.4 2025/05/12 05:42:02 tb Exp $ */
 /*
  * Regress test for sshbuf.h buffer API
  *
@@ -230,7 +230,7 @@ sshbuf_getput_crypto_tests(void)
        ASSERT_PTR_NE(ecp, NULL);
        MKBN(ec256_x, bn_x);
        MKBN(ec256_y, bn_y);
-       ASSERT_INT_EQ(EC_POINT_set_affine_coordinates_GFp(
+       ASSERT_INT_EQ(EC_POINT_set_affine_coordinates(
            EC_KEY_get0_group(eck), ecp, bn_x, bn_y, NULL), 1);
        ASSERT_INT_EQ(EC_KEY_set_public_key(eck, ecp), 1);
        BN_free(bn_x);
@@ -259,7 +259,7 @@ sshbuf_getput_crypto_tests(void)
        bn_y = BN_new();
        ASSERT_PTR_NE(bn_x, NULL);
        ASSERT_PTR_NE(bn_y, NULL);
-       ASSERT_INT_EQ(EC_POINT_get_affine_coordinates_GFp(
+       ASSERT_INT_EQ(EC_POINT_get_affine_coordinates(
            EC_KEY_get0_group(eck), EC_KEY_get0_public_key(eck),
            bn_x, bn_y, NULL), 1);
        MKBN(ec256_x, bn);