diff options
author | Nils Larsch <nils@openssl.org> | 2005-05-10 11:37:47 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2005-05-10 11:37:47 +0000 |
commit | 8b15c740180725e3e1e71ff619151840cdec46a5 (patch) | |
tree | ea4e30c81576aa0b35af6cfe5f21908ca514c2b3 /crypto/ec | |
parent | 3afa6cf866257e240bf6b62dfb714bd5669385c7 (diff) |
give EC_GROUP_new_by_nid a more meanigful name:
EC_GROUP_new_by_nid -> EC_GROUP_new_by_curve_name
Diffstat (limited to 'crypto/ec')
-rw-r--r-- | crypto/ec/ec.h | 7 | ||||
-rw-r--r-- | crypto/ec/ec_asn1.c | 2 | ||||
-rw-r--r-- | crypto/ec/ec_curve.c | 4 | ||||
-rw-r--r-- | crypto/ec/ec_err.c | 2 | ||||
-rw-r--r-- | crypto/ec/ectest.c | 4 |
5 files changed, 10 insertions, 9 deletions
diff --git a/crypto/ec/ec.h b/crypto/ec/ec.h index 6b90e7a8fd..cc608c74c8 100644 --- a/crypto/ec/ec.h +++ b/crypto/ec/ec.h @@ -178,8 +178,9 @@ int EC_GROUP_cmp(const EC_GROUP *, const EC_GROUP *, BN_CTX *); EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *); -/* EC_GROUP_new_by_nid() creates a EC_GROUP structure specified by a NID */ -EC_GROUP *EC_GROUP_new_by_nid(int nid); +/* EC_GROUP_new_by_curve_name() creates a EC_GROUP structure + * specified by a curve name (in form of a NID) */ +EC_GROUP *EC_GROUP_new_by_curve_name(int nid); /* handling of internal curves */ typedef struct { int nid; @@ -428,7 +429,7 @@ void ERR_load_EC_strings(void); #define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS 194 #define EC_F_EC_GROUP_GROUP2NID 147 #define EC_F_EC_GROUP_NEW 108 -#define EC_F_EC_GROUP_NEW_BY_NID 174 +#define EC_F_EC_GROUP_NEW_BY_CURVE_NAME 174 #define EC_F_EC_GROUP_NEW_FROM_DATA 175 #define EC_F_EC_GROUP_PRECOMPUTE_MULT 142 #define EC_F_EC_GROUP_SET_CURVE_GF2M 176 diff --git a/crypto/ec/ec_asn1.c b/crypto/ec/ec_asn1.c index 6c7de81eb7..5693201a26 100644 --- a/crypto/ec/ec_asn1.c +++ b/crypto/ec/ec_asn1.c @@ -967,7 +967,7 @@ EC_GROUP *ec_asn1_pkparameters2group(const ECPKPARAMETERS *params) if (params->type == 0) { /* the curve is given by an OID */ tmp = OBJ_obj2nid(params->value.named_curve); - if ((ret = EC_GROUP_new_by_nid(tmp)) == NULL) + if ((ret = EC_GROUP_new_by_curve_name(tmp)) == NULL) { ECerr(EC_F_EC_ASN1_PKPARAMETERS2GROUP, EC_R_EC_GROUP_NEW_BY_NAME_FAILURE); diff --git a/crypto/ec/ec_curve.c b/crypto/ec/ec_curve.c index 979f86530e..923cb71e03 100644 --- a/crypto/ec/ec_curve.c +++ b/crypto/ec/ec_curve.c @@ -1224,7 +1224,7 @@ err: return group; } -EC_GROUP *EC_GROUP_new_by_nid(int nid) +EC_GROUP *EC_GROUP_new_by_curve_name(int nid) { size_t i; EC_GROUP *ret = NULL; @@ -1241,7 +1241,7 @@ EC_GROUP *EC_GROUP_new_by_nid(int nid) if (ret == NULL) { - ECerr(EC_F_EC_GROUP_NEW_BY_NID, EC_R_UNKNOWN_GROUP); + ECerr(EC_F_EC_GROUP_NEW_BY_CURVE_NAME, EC_R_UNKNOWN_GROUP); return NULL; } diff --git a/crypto/ec/ec_err.c b/crypto/ec/ec_err.c index 4885f56901..73c0055f01 100644 --- a/crypto/ec/ec_err.c +++ b/crypto/ec/ec_err.c @@ -133,7 +133,7 @@ static ERR_STRING_DATA EC_str_functs[]= {ERR_FUNC(EC_F_EC_GROUP_GET_TRINOMIAL_BASIS), "EC_GROUP_get_trinomial_basis"}, {ERR_FUNC(EC_F_EC_GROUP_GROUP2NID), "EC_GROUP_GROUP2NID"}, {ERR_FUNC(EC_F_EC_GROUP_NEW), "EC_GROUP_new"}, -{ERR_FUNC(EC_F_EC_GROUP_NEW_BY_NID), "EC_GROUP_new_by_nid"}, +{ERR_FUNC(EC_F_EC_GROUP_NEW_BY_CURVE_NAME), "EC_GROUP_new_by_curve_name"}, {ERR_FUNC(EC_F_EC_GROUP_NEW_FROM_DATA), "EC_GROUP_NEW_FROM_DATA"}, {ERR_FUNC(EC_F_EC_GROUP_PRECOMPUTE_MULT), "EC_GROUP_precompute_mult"}, {ERR_FUNC(EC_F_EC_GROUP_SET_CURVE_GF2M), "EC_GROUP_set_curve_GF2m"}, diff --git a/crypto/ec/ectest.c b/crypto/ec/ectest.c index 92d2f671ac..fdca4b4504 100644 --- a/crypto/ec/ectest.c +++ b/crypto/ec/ectest.c @@ -1252,10 +1252,10 @@ void internal_curve_test(void) { EC_GROUP *group = NULL; int nid = curves[n].nid; - if ((group = EC_GROUP_new_by_nid(nid)) == NULL) + if ((group = EC_GROUP_new_by_curve_name(nid)) == NULL) { ok = 0; - fprintf(stdout, "\nEC_GROUP_new_by_nid() failed with" + fprintf(stdout, "\nEC_GROUP_new_curve_name() failed with" " curve %s\n", OBJ_nid2sn(nid)); /* try next curve */ continue; |