give EC_GROUP_new_by_nid a more meanigful name:
[openssl.git] / crypto / ec / ec_asn1.c
index bfb6f3c9cc16c31662618d4400203add92d78c1f..5693201a26a94c9e37030b15208e8c70e7760089 100644 (file)
@@ -384,7 +384,7 @@ static int ec_asn1_group2fieldid(const EC_GROUP *group, X9_62_FIELDID *field)
                                }
                        if (!ASN1_INTEGER_set(char_two->p.tpBasis, (long)k))
                                {
-                               ECerr(EC_F_EC_ASN1_GROUP2PARAMETERS,
+                               ECerr(EC_F_EC_ASN1_GROUP2FIELDID,
                                        ERR_R_ASN1_LIB);
                                goto err;
                                }
@@ -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;
@@ -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);
@@ -992,7 +992,7 @@ EC_GROUP *ec_asn1_pkparameters2group(const ECPKPARAMETERS *params)
                }
        else
                {
-               ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_ASN1_ERROR);
+               ECerr(EC_F_EC_ASN1_PKPARAMETERS2GROUP, EC_R_ASN1_ERROR);
                return NULL;
                }