in = BIO_new_file(file, "rb");
#endif
if (in == NULL) {
- CONFerr(CONF_F_CONF_LOAD, ERR_R_SYS_LIB);
+ ERR_raise(ERR_LIB_CONF, ERR_R_SYS_LIB);
return NULL;
}
BIO *btmp;
LHASH_OF(CONF_VALUE) *ltmp;
if ((btmp = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL) {
- CONFerr(CONF_F_CONF_LOAD_FP, ERR_R_BUF_LIB);
+ ERR_raise(ERR_LIB_CONF, ERR_R_BUF_LIB);
return NULL;
}
ltmp = CONF_load_bio(conf, btmp, eline);
int ret;
if ((btmp = BIO_new_fp(out, BIO_NOCLOSE)) == NULL) {
- CONFerr(CONF_F_CONF_DUMP_FP, ERR_R_BUF_LIB);
+ ERR_raise(ERR_LIB_CONF, ERR_R_BUF_LIB);
return 0;
}
ret = CONF_dump_bio(conf, btmp);
ret = meth->create(meth);
if (ret == NULL) {
- CONFerr(0, ERR_R_MALLOC_FAILURE);
+ ERR_raise(ERR_LIB_CONF, ERR_R_MALLOC_FAILURE);
return NULL;
}
ret->libctx = libctx;
int NCONF_load(CONF *conf, const char *file, long *eline)
{
if (conf == NULL) {
- CONFerr(CONF_F_NCONF_LOAD, CONF_R_NO_CONF);
+ ERR_raise(ERR_LIB_CONF, CONF_R_NO_CONF);
return 0;
}
BIO *btmp;
int ret;
if ((btmp = BIO_new_fp(fp, BIO_NOCLOSE)) == NULL) {
- CONFerr(CONF_F_NCONF_LOAD_FP, ERR_R_BUF_LIB);
+ ERR_raise(ERR_LIB_CONF, ERR_R_BUF_LIB);
return 0;
}
ret = NCONF_load_bio(conf, btmp, eline);
int NCONF_load_bio(CONF *conf, BIO *bp, long *eline)
{
if (conf == NULL) {
- CONFerr(CONF_F_NCONF_LOAD_BIO, CONF_R_NO_CONF);
+ ERR_raise(ERR_LIB_CONF, CONF_R_NO_CONF);
return 0;
}
STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf, const char *section)
{
if (conf == NULL) {
- CONFerr(CONF_F_NCONF_GET_SECTION, CONF_R_NO_CONF);
+ ERR_raise(ERR_LIB_CONF, CONF_R_NO_CONF);
return NULL;
}
if (section == NULL) {
- CONFerr(CONF_F_NCONF_GET_SECTION, CONF_R_NO_SECTION);
+ ERR_raise(ERR_LIB_CONF, CONF_R_NO_SECTION);
return NULL;
}
return s;
if (conf == NULL) {
- CONFerr(CONF_F_NCONF_GET_STRING,
- CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE);
+ ERR_raise(ERR_LIB_CONF, CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE);
return NULL;
}
- CONFerr(CONF_F_NCONF_GET_STRING, CONF_R_NO_VALUE);
+ ERR_raise(ERR_LIB_CONF, CONF_R_NO_VALUE);
ERR_add_error_data(4, "group=", group, " name=", name);
return NULL;
}
int (*to_int)(const CONF *, char) = &default_to_int;
if (result == NULL) {
- CONFerr(CONF_F_NCONF_GET_NUMBER_E, ERR_R_PASSED_NULL_PARAMETER);
+ ERR_raise(ERR_LIB_CONF, ERR_R_PASSED_NULL_PARAMETER);
return 0;
}
const int d = to_int(conf, *str);
if (res > (LONG_MAX - d) / 10L) {
- CONFerr(CONF_F_NCONF_GET_NUMBER_E, CONF_R_NUMBER_TOO_LARGE);
+ ERR_raise(ERR_LIB_CONF, CONF_R_NUMBER_TOO_LARGE);
return 0;
}
res = res * 10 + d;
BIO *btmp;
int ret;
if ((btmp = BIO_new_fp(out, BIO_NOCLOSE)) == NULL) {
- CONFerr(CONF_F_NCONF_DUMP_FP, ERR_R_BUF_LIB);
+ ERR_raise(ERR_LIB_CONF, ERR_R_BUF_LIB);
return 0;
}
ret = NCONF_dump_bio(conf, btmp);
int NCONF_dump_bio(const CONF *conf, BIO *out)
{
if (conf == NULL) {
- CONFerr(CONF_F_NCONF_DUMP_BIO, CONF_R_NO_CONF);
+ ERR_raise(ERR_LIB_CONF, CONF_R_NO_CONF);
return 0;
}