summaryrefslogtreecommitdiff
path: root/crypto/conf
diff options
context:
space:
mode:
authorbodo <bodo>2005-04-26 18:53:11 +0000
committerbodo <bodo>2005-04-26 18:53:11 +0000
commit5f8f91f2d375605961fade9753c3b65cff07b87f (patch)
treec3a557d947984a83f17046e03da32f2e320140ee /crypto/conf
parent6ee7dc2e3b834bfb6f0c91287350c3840243af8f (diff)
downloadopenssl-5f8f91f2d375605961fade9753c3b65cff07b87f.tar.gz
Fix various incorrect error function codes.
("perl util/ck_errf.pl */*.c */*/*.c" still reports many more.)
Diffstat (limited to 'crypto/conf')
-rw-r--r--crypto/conf/conf.h3
-rw-r--r--crypto/conf/conf_def.c30
-rw-r--r--crypto/conf/conf_err.c3
-rw-r--r--crypto/conf/conf_mod.c2
4 files changed, 22 insertions, 16 deletions
diff --git a/crypto/conf/conf.h b/crypto/conf/conf.h
index 48695a064..4c9b8058a 100644
--- a/crypto/conf/conf.h
+++ b/crypto/conf/conf.h
@@ -213,6 +213,9 @@ void ERR_load_CONF_strings(void);
#define CONF_F_CONF_LOAD_BIO 102
#define CONF_F_CONF_LOAD_FP 103
#define CONF_F_CONF_MODULES_LOAD 116
+#define CONF_F_CONF_MODULE_RUN 119
+#define CONF_F_DEF_LOAD 120
+#define CONF_F_DEF_LOAD_BIO 121
#define CONF_F_MODULE_INIT 115
#define CONF_F_MODULE_LOAD_DSO 117
#define CONF_F_MODULE_RUN 118
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c
index ba2a8830b..f14de2293 100644
--- a/crypto/conf/conf_def.c
+++ b/crypto/conf/conf_def.c
@@ -194,9 +194,9 @@ static int def_load(CONF *conf, const char *name, long *line)
if (in == NULL)
{
if (ERR_GET_REASON(ERR_peek_last_error()) == BIO_R_NO_SUCH_FILE)
- CONFerr(CONF_F_CONF_LOAD,CONF_R_NO_SUCH_FILE);
+ CONFerr(CONF_F_DEF_LOAD,CONF_R_NO_SUCH_FILE);
else
- CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB);
+ CONFerr(CONF_F_DEF_LOAD,ERR_R_SYS_LIB);
return 0;
}
@@ -225,28 +225,28 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
if ((buff=BUF_MEM_new()) == NULL)
{
- CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB);
+ CONFerr(CONF_F_DEF_LOAD_BIO,ERR_R_BUF_LIB);
goto err;
}
section=(char *)OPENSSL_malloc(10);
if (section == NULL)
{
- CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE);
+ CONFerr(CONF_F_DEF_LOAD_BIO,ERR_R_MALLOC_FAILURE);
goto err;
}
BUF_strlcpy(section,"default",10);
if (_CONF_new_data(conf) == 0)
{
- CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_MALLOC_FAILURE);
+ CONFerr(CONF_F_DEF_LOAD_BIO,ERR_R_MALLOC_FAILURE);
goto err;
}
sv=_CONF_new_section(conf,section);
if (sv == NULL)
{
- CONFerr(CONF_F_CONF_LOAD_BIO,
+ CONFerr(CONF_F_DEF_LOAD_BIO,
CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
goto err;
}
@@ -258,7 +258,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
{
if (!BUF_MEM_grow(buff,bufnum+CONFBUFSIZE))
{
- CONFerr(CONF_F_CONF_LOAD_BIO,ERR_R_BUF_LIB);
+ CONFerr(CONF_F_DEF_LOAD_BIO,ERR_R_BUF_LIB);
goto err;
}
p= &(buff->data[bufnum]);
@@ -329,7 +329,7 @@ again:
ss=p;
goto again;
}
- CONFerr(CONF_F_CONF_LOAD_BIO,
+ CONFerr(CONF_F_DEF_LOAD_BIO,
CONF_R_MISSING_CLOSE_SQUARE_BRACKET);
goto err;
}
@@ -339,7 +339,7 @@ again:
sv=_CONF_new_section(conf,section);
if (sv == NULL)
{
- CONFerr(CONF_F_CONF_LOAD_BIO,
+ CONFerr(CONF_F_DEF_LOAD_BIO,
CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
goto err;
}
@@ -362,7 +362,7 @@ again:
p=eat_ws(conf, end);
if (*p != '=')
{
- CONFerr(CONF_F_CONF_LOAD_BIO,
+ CONFerr(CONF_F_DEF_LOAD_BIO,
CONF_R_MISSING_EQUAL_SIGN);
goto err;
}
@@ -379,7 +379,7 @@ again:
if (!(v=(CONF_VALUE *)OPENSSL_malloc(sizeof(CONF_VALUE))))
{
- CONFerr(CONF_F_CONF_LOAD_BIO,
+ CONFerr(CONF_F_DEF_LOAD_BIO,
ERR_R_MALLOC_FAILURE);
goto err;
}
@@ -388,7 +388,7 @@ again:
v->value=NULL;
if (v->name == NULL)
{
- CONFerr(CONF_F_CONF_LOAD_BIO,
+ CONFerr(CONF_F_DEF_LOAD_BIO,
ERR_R_MALLOC_FAILURE);
goto err;
}
@@ -402,7 +402,7 @@ again:
tv=_CONF_new_section(conf,psection);
if (tv == NULL)
{
- CONFerr(CONF_F_CONF_LOAD_BIO,
+ CONFerr(CONF_F_DEF_LOAD_BIO,
CONF_R_UNABLE_TO_CREATE_NEW_SECTION);
goto err;
}
@@ -416,7 +416,7 @@ again:
#if 1
if (_CONF_add_string(conf, tv, v) == 0)
{
- CONFerr(CONF_F_CONF_LOAD_BIO,
+ CONFerr(CONF_F_DEF_LOAD_BIO,
ERR_R_MALLOC_FAILURE);
goto err;
}
@@ -424,7 +424,7 @@ again:
v->section=tv->section;
if (!sk_CONF_VALUE_push(ts,v))
{
- CONFerr(CONF_F_CONF_LOAD_BIO,
+ CONFerr(CONF_F_DEF_LOAD_BIO,
ERR_R_MALLOC_FAILURE);
goto err;
}
diff --git a/crypto/conf/conf_err.c b/crypto/conf/conf_err.c
index f5e2ca4bf..020e5d237 100644
--- a/crypto/conf/conf_err.c
+++ b/crypto/conf/conf_err.c
@@ -75,6 +75,9 @@ static ERR_STRING_DATA CONF_str_functs[]=
{ERR_FUNC(CONF_F_CONF_LOAD_BIO), "CONF_load_bio"},
{ERR_FUNC(CONF_F_CONF_LOAD_FP), "CONF_load_fp"},
{ERR_FUNC(CONF_F_CONF_MODULES_LOAD), "CONF_modules_load"},
+{ERR_FUNC(CONF_F_CONF_MODULE_RUN), "CONF_MODULE_RUN"},
+{ERR_FUNC(CONF_F_DEF_LOAD), "DEF_LOAD"},
+{ERR_FUNC(CONF_F_DEF_LOAD_BIO), "DEF_LOAD_BIO"},
{ERR_FUNC(CONF_F_MODULE_INIT), "MODULE_INIT"},
{ERR_FUNC(CONF_F_MODULE_LOAD_DSO), "MODULE_LOAD_DSO"},
{ERR_FUNC(CONF_F_MODULE_RUN), "MODULE_RUN"},
diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c
index bae9fcaff..46af48280 100644
--- a/crypto/conf/conf_mod.c
+++ b/crypto/conf/conf_mod.c
@@ -231,7 +231,7 @@ static int module_run(const CONF *cnf, char *name, char *value,
if (!(flags & CONF_MFLAGS_SILENT))
{
char rcode[DECIMAL_SIZE(ret)+1];
- CONFerr(CONF_F_CONF_MODULES_LOAD, CONF_R_MODULE_INITIALIZATION_ERROR);
+ CONFerr(CONF_F_CONF_MODULE_RUN, CONF_R_MODULE_INITIALIZATION_ERROR);
BIO_snprintf(rcode, sizeof rcode, "%-8d", ret);
ERR_add_error_data(6, "module=", name, ", value=", value, ", retcode=", rcode);
}