Logo Search packages:      
Sourcecode: openssl version File versions  Download package

Creates a EC_GROUP object with a curve specified by a NID

Parameters:
nidNID of the OID of the curve name
Returns:
newly created EC_GROUP object with specified curve or NULL if an error occurred

Definition at line 2017 of file ec_curve.c.

References EC_GROUP_new_by_curve_name(), and EC_GROUP_set_curve_name().

Referenced by EC_GROUP_new_by_curve_name(), and EC_KEY_new_by_curve_name().

      {
      size_t i;
      EC_GROUP *ret = NULL;

      if (nid <= 0)
            return NULL;

      for (i=0; i<curve_list_length; i++)
            if (curve_list[i].nid == nid)
                  {
                  ret = ec_group_new_from_data(curve_list[i].data);
                  break;
                  }

      if (ret == NULL)
            {
            ECerr(EC_F_EC_GROUP_NEW_BY_CURVE_NAME, EC_R_UNKNOWN_GROUP);
            return NULL;
            }

      EC_GROUP_set_curve_name(ret, nid);

      return ret;
      }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index