give EC_GROUP_*_nid functions a more meaningful name
authorNils Larsch <nils@openssl.org>
Sun, 8 May 2005 22:09:12 +0000 (22:09 +0000)
committerNils Larsch <nils@openssl.org>
Sun, 8 May 2005 22:09:12 +0000 (22:09 +0000)
EC_GROUP_get_nid -> EC_GROUP_get_curve_name
EC_GROUP_set_nid -> EC_GROUP_set_curve_name

crypto/asn1/t_pkey.c
crypto/asn1/x_pubkey.c
crypto/ec/ec.h
crypto/ec/ec_asn1.c
crypto/ec/ec_curve.c
crypto/ec/ec_lib.c
crypto/evp/evp_pkey.c
ssl/s3_srvr.c
util/libeay.num

index 94bd37c32ea947868b8251cf656d55a1d88ffa43..687a2bd6f561ad0993425d9ef627813d491f58b3 100644 (file)
@@ -303,7 +303,7 @@ int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off)
                if (!BIO_indent(bp, off, 128))
                        goto err;
 
-               nid = EC_GROUP_get_nid(x);
+               nid = EC_GROUP_get_curve_name(x);
                if (nid == 0)
                        goto err;
 
index 2a7f2cab15fbe0c825120641069286abf33be9e8..c3bfd8db37b816d13d6631cf42a28251c4fa9655 100644 (file)
@@ -171,7 +171,7 @@ int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey)
                        }
 
                if (EC_GROUP_get_asn1_flag(eckey->group)
-                     && (nid = EC_GROUP_get_nid(eckey->group)))
+                     && (nid = EC_GROUP_get_curve_name(eckey->group)))
                        {
                        /* just set the OID */
                        a->parameter->type = V_ASN1_OBJECT;
index 2813b374b1d703f3cc80869a34beb9101be606b9..6b90e7a8fd21cff62409d9f6a11be039fc557230 100644 (file)
@@ -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 *);
index d43ca49ec7ac1cda57b0455cd6954940fd852bb3..6c7de81eb7e6c57b213836a8f5a66d882abc48f9 100644 (file)
@@ -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;
index a523b206c70720177c26fc94a8adfdea6bfe839a..979f86530eac322668d75763b7e4d17e7cd6fa5d 100644 (file)
@@ -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;
        }
index 98c2edc61147e9c19183cef790f35cfb5b07dde8..ae9ee08660f4d1b3a39b07f43231f3e2d259b041 100644 (file)
@@ -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)
index 7260460744d646f90e44f976baa84ebaf800abd9..41107686ec97e319f5528da44c2436ead9c799c6 100644 (file)
@@ -616,7 +616,7 @@ static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
        }
        
        if (EC_GROUP_get_asn1_flag(eckey->group)
-                     && (nid = EC_GROUP_get_nid(eckey->group)))
+                     && (nid = EC_GROUP_get_curve_name(eckey->group)))
        {
                /* we have a 'named curve' => just set the OID */
                p8->pkeyalg->parameter->type = V_ASN1_OBJECT;
index 6daf703f5e1be2bbccc8b02f4603e59558e9380a..a34fc729be021738a9a6d557c920df3b86a7f970 100644 (file)
@@ -1327,7 +1327,7 @@ int ssl3_send_server_key_exchange(SSL *s)
                         * supported named curves, curve_id is non-zero.
                         */
                        if ((curve_id = 
-                           nid2curve_id(EC_GROUP_get_nid(ecdh->group)))
+                           nid2curve_id(EC_GROUP_get_curve_name(ecdh->group)))
                            == 0)
                                {
                                SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_UNSUPPORTED_ELLIPTIC_CURVE);
index 559ca3085cd4408ab2ebe494da6cf3b59b239e66..921b7c42cf4c1ec7e7e51eec74b29d45ce9641cb 100755 (executable)
@@ -2937,7 +2937,7 @@ X509_VERIFY_PARAM_set1_policies         3367      EXIST::FUNCTION:
 EVP_sha512                              3368   EXIST::FUNCTION:SHA,SHA512
 X509_VERIFY_PARAM_set1_name             3369   EXIST::FUNCTION:
 X509_VERIFY_PARAM_set_purpose           3370   EXIST::FUNCTION:
-EC_GROUP_get_nid                        3371   EXIST::FUNCTION:EC
+EC_GROUP_get_curve_name                 3371   EXIST::FUNCTION:EC
 STORE_get_number                        3372   EXIST::FUNCTION:
 ECDSA_sign_setup                        3373   EXIST::FUNCTION:ECDSA
 BN_GF2m_mod_solve_quad_arr              3374   EXIST::FUNCTION:
@@ -2983,7 +2983,7 @@ ECDSA_SIG_free                          3409      EXIST::FUNCTION:ECDSA
 PEM_write_bio_ECPKParameters            3410   EXIST::FUNCTION:EC
 STORE_method_set_ctrl_function          3411   EXIST::FUNCTION:
 STORE_list_public_key_end               3412   EXIST::FUNCTION:
-EC_GROUP_set_nid                        3413   EXIST::FUNCTION:EC
+EC_GROUP_set_curve_name                 3413   EXIST::FUNCTION:EC
 STORE_get_arbitrary                     3414   EXIST::FUNCTION:
 STORE_store_crl                         3415   EXIST::FUNCTION:
 X509_policy_node_get0_policy            3416   EXIST::FUNCTION: