From aa15470973d1fcdb50d16c63b9cff3c9367ce30c Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 22 Nov 2024 12:14:41 +0000 Subject: Rename curve_name into nid This used to be the case until they were given a 'more meaningful name' about 20 years ago. We cant fix the public API, but I'm tired of being confused by this nonsense. --- src/lib/libcrypto/ec/ec_lib.c | 8 ++++---- src/lib/libcrypto/ec/ec_local.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/ec/ec_lib.c b/src/lib/libcrypto/ec/ec_lib.c index 9be8f22222..542f7a0ba2 100644 --- a/src/lib/libcrypto/ec/ec_lib.c +++ b/src/lib/libcrypto/ec/ec_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_lib.c,v 1.87 2024/11/17 10:48:13 tb Exp $ */ +/* $OpenBSD: ec_lib.c,v 1.88 2024/11/22 12:14:41 tb Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -169,7 +169,7 @@ EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src) return 0; } - dest->curve_name = src->curve_name; + dest->nid = src->nid; dest->asn1_flag = src->asn1_flag; dest->asn1_form = src->asn1_form; @@ -408,14 +408,14 @@ EC_GROUP_get0_cofactor(const EC_GROUP *group) void EC_GROUP_set_curve_name(EC_GROUP *group, int nid) { - group->curve_name = nid; + group->nid = nid; } LCRYPTO_ALIAS(EC_GROUP_set_curve_name); int EC_GROUP_get_curve_name(const EC_GROUP *group) { - return group->curve_name; + return group->nid; } LCRYPTO_ALIAS(EC_GROUP_get_curve_name); diff --git a/src/lib/libcrypto/ec/ec_local.h b/src/lib/libcrypto/ec/ec_local.h index db8d4ab28f..5d1909db03 100644 --- a/src/lib/libcrypto/ec/ec_local.h +++ b/src/lib/libcrypto/ec/ec_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_local.h,v 1.38 2024/11/16 15:32:08 tb Exp $ */ +/* $OpenBSD: ec_local.h,v 1.39 2024/11/22 12:14:41 tb Exp $ */ /* * Originally written by Bodo Moeller for the OpenSSL project. */ @@ -175,7 +175,7 @@ struct ec_group_st { BIGNUM order; BIGNUM cofactor; - int curve_name; /* Optional NID for named curve. */ + int nid; /* Optional NID for named curve. */ /* ASN.1 encoding controls. */ int asn1_flag; -- cgit v1.2.3-55-g6feb