See the OpenSSL documentation for
EC_GROUP_get_curve_name()
static VALUE ossl_ec_group_get_curve_name(VALUE self)
{
EC_GROUP *group = NULL;
int nid;
Get_EC_GROUP(self, group);
if (group == NULL)
return Qnil;
nid = EC_GROUP_get_curve_name(group);
/* BUG: an nid or asn1 object should be returned, maybe. */
return rb_str_new2(OBJ_nid2sn(nid));
}