for (;;) {
if (!ossl_isalpha(*s)) {
- PROPerr(PROP_F_PARSE_NAME, PROP_R_NOT_AN_IDENTIFIER);
- ERR_add_error_data(2, "HERE-->", *t);
+ ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_IDENTIFIER,
+ "HERE-->%s", *t);
return 0;
}
do {
}
name[i] = '\0';
if (err) {
- PROPerr(PROP_F_PARSE_NAME, PROP_R_NAME_TOO_LONG);
- ERR_add_error_data(2, "HERE-->", *t);
+ ERR_raise_data(ERR_LIB_PROP, PROP_R_NAME_TOO_LONG, "HERE-->%s", *t);
return 0;
}
*t = skip_space(s);
v = v * 10 + (*s++ - '0');
} while (ossl_isdigit(*s));
if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
- PROPerr(PROP_F_PARSE_NUMBER, PROP_R_NOT_A_DECIMAL_DIGIT);
- ERR_add_error_data(2, "HERE-->", *t);
+ ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_A_DECIMAL_DIGIT,
+ "HERE-->%s", *t);
return 0;
}
*t = skip_space(s);
v += ossl_tolower(*s) - 'a';
} while (ossl_isxdigit(*++s));
if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
- PROPerr(PROP_F_PARSE_HEX, PROP_R_NOT_AN_HEXADECIMAL_DIGIT);
- ERR_add_error_data(2, "HERE-->", *t);
+ ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_HEXADECIMAL_DIGIT,
+ "HERE-->%s", *t);
return 0;
}
*t = skip_space(s);
v = (v << 3) + (*s - '0');
} while (ossl_isdigit(*++s) && *s != '9' && *s != '8');
if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
- PROPerr(PROP_F_PARSE_OCT, PROP_R_NOT_AN_OCTAL_DIGIT);
- ERR_add_error_data(2, "HERE-->", *t);
+ ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_OCTAL_DIGIT,
+ "HERE-->%s", *t);
return 0;
}
*t = skip_space(s);
s++;
}
if (*s == '\0') {
- char buf[2] = { 0, 0 };
-
- PROPerr(PROP_F_PARSE_STRING,
- PROP_R_NO_MATCHING_STRING_DELIMETER);
- buf[0] = delim;
- ERR_add_error_data(3, "HERE-->", buf, *t);
+ ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_MATCHING_STRING_DELIMETER,
+ "HERE-->%c%s", delim, *t);
return 0;
}
v[i] = '\0';
if (err) {
- PROPerr(PROP_F_PARSE_STRING, PROP_R_STRING_TOO_LONG);
- ERR_add_error_data(2, "HERE-->", *t);
+ ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
} else {
res->v.str_val = ossl_property_value(ctx, v, create);
}
s++;
}
if (!ossl_isspace(*s) && *s != '\0' && *s != ',') {
- PROPerr(PROP_F_PARSE_UNQUOTED, PROP_R_NOT_AN_ASCII_CHARACTER);
- ERR_add_error_data(2, "HERE-->", s);
+ ERR_raise_data(ERR_LIB_PROP, PROP_R_NOT_AN_ASCII_CHARACTER,
+ "HERE-->%s", s);
return 0;
}
v[i] = 0;
if (err) {
- PROPerr(PROP_F_PARSE_UNQUOTED, PROP_R_STRING_TOO_LONG);
- ERR_add_error_data(2, "HERE-->", *t);
+ ERR_raise_data(ERR_LIB_PROP, PROP_R_STRING_TOO_LONG, "HERE-->%s", *t);
} else {
res->v.str_val = ossl_property_value(ctx, v, create);
}
goto err;
prop->oper = PROPERTY_OPER_EQ;
if (prop->name_idx == 0) {
- PROPerr(PROP_F_OSSL_PARSE_PROPERTY, PROP_R_PARSE_FAILED);
- ERR_add_error_data(2, "Unknown name HERE-->", start);
+ ERR_raise_data(ERR_LIB_PROP, PROP_R_PARSE_FAILED,
+ "Unknown name HERE-->%s", start);
goto err;
}
if (match_ch(&s, '=')) {
if (!parse_value(ctx, &s, prop, 1)) {
- PROPerr(PROP_F_OSSL_PARSE_PROPERTY, PROP_R_NO_VALUE);
- ERR_add_error_data(2, "HERE-->", start);
+ ERR_raise_data(ERR_LIB_PROP, PROP_R_NO_VALUE,
+ "HERE-->%s", start);
goto err;
}
} else {
done = !match_ch(&s, ',');
}
if (*s != '\0') {
- PROPerr(PROP_F_OSSL_PARSE_PROPERTY, PROP_R_TRAILING_CHARACTERS);
- ERR_add_error_data(2, "HERE-->", s);
+ ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
+ "HERE-->%s", s);
goto err;
}
res = stack_to_property_list(sk);
done = !match_ch(&s, ',');
}
if (*s != '\0') {
- PROPerr(PROP_F_OSSL_PARSE_QUERY, PROP_R_TRAILING_CHARACTERS);
- ERR_add_error_data(2, "HERE-->", s);
+ ERR_raise_data(ERR_LIB_PROP, PROP_R_TRAILING_CHARACTERS,
+ "HERE-->%s", s);
goto err;
}
res = stack_to_property_list(sk);