summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2024-11-22 12:14:41 +0000
committertb <>2024-11-22 12:14:41 +0000
commitaa15470973d1fcdb50d16c63b9cff3c9367ce30c (patch)
tree4564b7acb4d64256f7bba342c754cef2fb6a5c02 /src
parentcf63b745b2a0b54ab2a49b3856dcbd7bb23ebd02 (diff)
downloadopenbsd-aa15470973d1fcdb50d16c63b9cff3c9367ce30c.tar.gz
openbsd-aa15470973d1fcdb50d16c63b9cff3c9367ce30c.tar.bz2
openbsd-aa15470973d1fcdb50d16c63b9cff3c9367ce30c.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/ec/ec_lib.c8
-rw-r--r--src/lib/libcrypto/ec/ec_local.h4
2 files changed, 6 insertions, 6 deletions
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 @@
1/* $OpenBSD: ec_lib.c,v 1.87 2024/11/17 10:48:13 tb Exp $ */ 1/* $OpenBSD: ec_lib.c,v 1.88 2024/11/22 12:14:41 tb Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -169,7 +169,7 @@ EC_GROUP_copy(EC_GROUP *dest, const EC_GROUP *src)
169 return 0; 169 return 0;
170 } 170 }
171 171
172 dest->curve_name = src->curve_name; 172 dest->nid = src->nid;
173 dest->asn1_flag = src->asn1_flag; 173 dest->asn1_flag = src->asn1_flag;
174 dest->asn1_form = src->asn1_form; 174 dest->asn1_form = src->asn1_form;
175 175
@@ -408,14 +408,14 @@ EC_GROUP_get0_cofactor(const EC_GROUP *group)
408void 408void
409EC_GROUP_set_curve_name(EC_GROUP *group, int nid) 409EC_GROUP_set_curve_name(EC_GROUP *group, int nid)
410{ 410{
411 group->curve_name = nid; 411 group->nid = nid;
412} 412}
413LCRYPTO_ALIAS(EC_GROUP_set_curve_name); 413LCRYPTO_ALIAS(EC_GROUP_set_curve_name);
414 414
415int 415int
416EC_GROUP_get_curve_name(const EC_GROUP *group) 416EC_GROUP_get_curve_name(const EC_GROUP *group)
417{ 417{
418 return group->curve_name; 418 return group->nid;
419} 419}
420LCRYPTO_ALIAS(EC_GROUP_get_curve_name); 420LCRYPTO_ALIAS(EC_GROUP_get_curve_name);
421 421
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 @@
1/* $OpenBSD: ec_local.h,v 1.38 2024/11/16 15:32:08 tb Exp $ */ 1/* $OpenBSD: ec_local.h,v 1.39 2024/11/22 12:14:41 tb Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -175,7 +175,7 @@ struct ec_group_st {
175 BIGNUM order; 175 BIGNUM order;
176 BIGNUM cofactor; 176 BIGNUM cofactor;
177 177
178 int curve_name; /* Optional NID for named curve. */ 178 int nid; /* Optional NID for named curve. */
179 179
180 /* ASN.1 encoding controls. */ 180 /* ASN.1 encoding controls. */
181 int asn1_flag; 181 int asn1_flag;