From 7dc17a6cf015b175c78f3c459498b05a0d6b2955 Mon Sep 17 00:00:00 2001 From: Nils Larsch Date: Sun, 8 May 2005 22:09:12 +0000 Subject: give EC_GROUP_*_nid functions a more meaningful name EC_GROUP_get_nid -> EC_GROUP_get_curve_name EC_GROUP_set_nid -> EC_GROUP_set_curve_name --- crypto/ec/ec.h | 4 ++-- crypto/ec/ec_asn1.c | 2 +- crypto/ec/ec_curve.c | 2 +- crypto/ec/ec_lib.c | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'crypto/ec') diff --git a/crypto/ec/ec.h b/crypto/ec/ec.h index 2813b374b1..6b90e7a8fd 100644 --- a/crypto/ec/ec.h +++ b/crypto/ec/ec.h @@ -143,8 +143,8 @@ EC_POINT *EC_GROUP_get0_generator(const EC_GROUP *); int EC_GROUP_get_order(const EC_GROUP *, BIGNUM *order, BN_CTX *); int EC_GROUP_get_cofactor(const EC_GROUP *, BIGNUM *cofactor, BN_CTX *); -void EC_GROUP_set_nid(EC_GROUP *, int); /* curve name */ -int EC_GROUP_get_nid(const EC_GROUP *); +void EC_GROUP_set_curve_name(EC_GROUP *, int nid); /* curve name */ +int EC_GROUP_get_curve_name(const EC_GROUP *); void EC_GROUP_set_asn1_flag(EC_GROUP *, int flag); int EC_GROUP_get_asn1_flag(const EC_GROUP *); diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c index d43ca49ec7..6c7de81eb7 100644 --- a/crypto/ec/ec_asn1.c +++ b/crypto/ec/ec_asn1.c @@ -707,7 +707,7 @@ ECPKPARAMETERS *ec_asn1_group2pkparameters(const EC_GROUP *group, /* use the asn1 OID to describe the * the elliptic curve parameters */ - tmp = EC_GROUP_get_nid(group); + tmp = EC_GROUP_get_curve_name(group); if (tmp) { ret->type = 0; diff --git a/crypto/ec/ec_curve.c b/crypto/ec/ec_curve.c index a523b206c7..979f86530e 100644 --- a/crypto/ec/ec_curve.c +++ b/crypto/ec/ec_curve.c @@ -1245,7 +1245,7 @@ EC_GROUP *EC_GROUP_new_by_nid(int nid) return NULL; } - EC_GROUP_set_nid(ret, nid); + EC_GROUP_set_curve_name(ret, nid); return ret; } diff --git a/crypto/ec/ec_lib.c b/crypto/ec/ec_lib.c index 98c2edc611..ae9ee08660 100644 --- a/crypto/ec/ec_lib.c +++ b/crypto/ec/ec_lib.c @@ -334,13 +334,13 @@ int EC_GROUP_get_cofactor(const EC_GROUP *group, BIGNUM *cofactor, BN_CTX *ctx) } -void EC_GROUP_set_nid(EC_GROUP *group, int nid) +void EC_GROUP_set_curve_name(EC_GROUP *group, int nid) { group->curve_name = nid; } -int EC_GROUP_get_nid(const EC_GROUP *group) +int EC_GROUP_get_curve_name(const EC_GROUP *group) { return group->curve_name; } @@ -481,8 +481,8 @@ int EC_GROUP_cmp(const EC_GROUP *a, const EC_GROUP *b, BN_CTX *ctx) EC_METHOD_get_field_type(EC_GROUP_method_of(b))) return 1; /* compare the curve name (if present) */ - if (EC_GROUP_get_nid(a) && EC_GROUP_get_nid(b) && - EC_GROUP_get_nid(a) == EC_GROUP_get_nid(b)) + if (EC_GROUP_get_curve_name(a) && EC_GROUP_get_curve_name(b) && + EC_GROUP_get_curve_name(a) == EC_GROUP_get_curve_name(b)) return 0; if (!ctx) -- cgit v1.2.3