diff options
| author | tb <> | 2024-11-22 12:14:41 +0000 |
|---|---|---|
| committer | tb <> | 2024-11-22 12:14:41 +0000 |
| commit | 867439fbf4403ba93411cab0150b5821a28d4a40 (patch) | |
| tree | 4564b7acb4d64256f7bba342c754cef2fb6a5c02 /src | |
| parent | 774977599450d8bb74a955cf0ef9cdaa877cbdb2 (diff) | |
| download | openbsd-867439fbf4403ba93411cab0150b5821a28d4a40.tar.gz openbsd-867439fbf4403ba93411cab0150b5821a28d4a40.tar.bz2 openbsd-867439fbf4403ba93411cab0150b5821a28d4a40.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.c | 8 | ||||
| -rw-r--r-- | src/lib/libcrypto/ec/ec_local.h | 4 |
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) | |||
| 408 | void | 408 | void |
| 409 | EC_GROUP_set_curve_name(EC_GROUP *group, int nid) | 409 | EC_GROUP_set_curve_name(EC_GROUP *group, int nid) |
| 410 | { | 410 | { |
| 411 | group->curve_name = nid; | 411 | group->nid = nid; |
| 412 | } | 412 | } |
| 413 | LCRYPTO_ALIAS(EC_GROUP_set_curve_name); | 413 | LCRYPTO_ALIAS(EC_GROUP_set_curve_name); |
| 414 | 414 | ||
| 415 | int | 415 | int |
| 416 | EC_GROUP_get_curve_name(const EC_GROUP *group) | 416 | EC_GROUP_get_curve_name(const EC_GROUP *group) |
| 417 | { | 417 | { |
| 418 | return group->curve_name; | 418 | return group->nid; |
| 419 | } | 419 | } |
| 420 | LCRYPTO_ALIAS(EC_GROUP_get_curve_name); | 420 | LCRYPTO_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; |
