EC_GROUP_set_point_conversion_form(ret, (point_conversion_form_t) (params->base->data[0] & ~0x01));
static EC_GROUP *ec_asn1_parameters2group(const ECPARAMETERS *params)	{	int	  ok=0, tmp;	EC_GROUP  *ret=NULL;	BIGNUM	  *p=NULL, *a=NULL, *b=NULL;	EC_POINT  *point=NULL;	if (!params->fieldID || !params->fieldID->fieldType || 	    !params->fieldID->parameters)		{		ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_ASN1_ERROR);		goto err;		}	tmp = OBJ_obj2nid(params->fieldID->fieldType);	if (tmp == NID_X9_62_characteristic_two_field)		{		ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_NOT_IMPLEMENTED);		goto err;		}	else if (tmp == NID_X9_62_prime_field)		{		/* we have a curve over a prime field */		/* extract the prime number */		if (params->fieldID->parameters->type != V_ASN1_INTEGER ||		    !params->fieldID->parameters->value.integer)			{			ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_ASN1_ERROR);			goto err;			}		p = ASN1_INTEGER_to_BN(params->fieldID->parameters->value.integer, NULL);		if (p == NULL)			{			ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, ERR_R_ASN1_LIB);			goto err;			}		/* now extract the curve parameters a and b */		if (!params->curve || !params->curve->a || 		    !params->curve->a->data || !params->curve->b ||		    !params->curve->b->data)			{			ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_ASN1_ERROR);			goto err;			}		a = BN_bin2bn(params->curve->a->data, 		              params->curve->a->length, NULL);		if (a == NULL)			{			ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, ERR_R_BN_LIB);			goto err;			}		b = BN_bin2bn(params->curve->b->data, params->curve->b->length, NULL);		if (b == NULL)			{			ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, ERR_R_BN_LIB);			goto err;			}		/* create the EC_GROUP structure *//* TODO */		ret = EC_GROUP_new_curve_GFp(p, a, b, NULL);		if (ret == NULL)			{			ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, ERR_R_EC_LIB);			goto err;			}		/* create the generator */		if ((point = EC_POINT_new(ret)) == NULL) goto err;		}	else 		{		ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_ASN1_UNKNOWN_FIELD);		goto err;		}	if (params->curve->seed != NULL)		{		if (ret->seed != NULL)			OPENSSL_free(ret->seed);		if (!(ret->seed = OPENSSL_malloc(params->curve->seed->length)))			{			ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, 			      ERR_R_MALLOC_FAILURE);			goto err;			}		memcpy(ret->seed, params->curve->seed->data, 		       params->curve->seed->length);		ret->seed_len = params->curve->seed->length;		}	if (!params->order || !params->cofactor || !params->base ||	    !params->base->data)		{		ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, EC_R_ASN1_ERROR);		goto err;		}	a = ASN1_INTEGER_to_BN(params->order, a);	b = ASN1_INTEGER_to_BN(params->cofactor, b);	if (!a || !b)		{		ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, ERR_R_ASN1_LIB);		goto err;		}	if (!EC_POINT_oct2point(ret, point, params->base->data, 		                params->base->length, NULL))		{		ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, ERR_R_EC_LIB);		goto err;		}	if (!EC_GROUP_set_generator(ret, point, a, b))		{		ECerr(EC_F_EC_ASN1_PARAMETERS2GROUP, ERR_R_EC_LIB);		goto err;		}	ok = 1;err:	if (!ok)		{		if (ret) 			EC_GROUP_clear_free(ret);		ret = NULL;		}	if (p)			BN_free(p);	if (a)			BN_free(a);	if (b)			BN_free(b);	if (point)			EC_POINT_free(point);	return(ret);}