Lines Matching defs:params
795 ec_asn1_group2pkparameters(const EC_GROUP *group, ECPKPARAMETERS *params)
798 ECPKPARAMETERS *ret = params;
841 ec_asn1_parameters2group(const ECPARAMETERS *params)
849 if (!params->fieldID || !params->fieldID->fieldType ||
850 !params->fieldID->p.ptr) {
855 if (!params->curve || !params->curve->a ||
856 !params->curve->a->data || !params->curve->b ||
857 !params->curve->b->data) {
861 a = BN_bin2bn(params->curve->a->data, params->curve->a->length, NULL);
866 b = BN_bin2bn(params->curve->b->data, params->curve->b->length, NULL);
872 tmp = OBJ_obj2nid(params->fieldID->fieldType);
879 if (!params->fieldID->p.prime) {
883 p = ASN1_INTEGER_to_BN(params->fieldID->p.prime, NULL);
909 if (params->curve->seed != NULL) {
911 if (!(ret->seed = malloc(params->curve->seed->length))) {
915 memcpy(ret->seed, params->curve->seed->data,
916 params->curve->seed->length);
917 ret->seed_len = params->curve->seed->length;
919 if (!params->order || !params->base || !params->base->data) {
928 (params->base->data[0] & ~0x01));
931 if (!EC_POINT_oct2point(ret, point, params->base->data,
932 params->base->length, NULL)) {
937 if ((a = ASN1_INTEGER_to_BN(params->order, a)) == NULL) {
950 if (params->cofactor == NULL) {
953 } else if ((b = ASN1_INTEGER_to_BN(params->cofactor, b)) == NULL) {
977 ec_asn1_pkparameters2group(const ECPKPARAMETERS *params)
982 if (params == NULL) {
986 if (params->type == 0) {/* the curve is given by an OID */
987 tmp = OBJ_obj2nid(params->value.named_curve);
993 } else if (params->type == 1) { /* the parameters are given by a
995 ret = ec_asn1_parameters2group(params->value.parameters);
1001 } else if (params->type == 2) { /* implicitlyCA */
1015 ECPKPARAMETERS *params;
1017 if ((params = d2i_ECPKPARAMETERS(NULL, in, len)) == NULL) {
1021 if ((group = ec_asn1_pkparameters2group(params)) == NULL) {
1032 ECPKPARAMETERS_free(params);