summaryrefslogtreecommitdiffstats
path: root/crypto/conf
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2002-01-24 16:16:43 +0000
committerBodo Möller <bodo@openssl.org>2002-01-24 16:16:43 +0000
commita14e2d9dfe0bc17800a5ab6b0439a3db50702586 (patch)
tree8c2cd60a3175e666ca68800fc0d245e65af1d496 /crypto/conf
parenta8b94d64095204817c7c561d069322d4df12010e (diff)
New functions
ERR_peek_last_error ERR_peek_last_error_line ERR_peek_last_error_line_data (supersedes ERR_peek_top_error). Rename OPENSSL_NO_OLD_DES_SUPPORT into OPENSSL_DISABLE_OLD_DES_SUPPORT because OPENSSL_NO_... indicates disabled algorithms (according to mkdef.pl).
Diffstat (limited to 'crypto/conf')
-rw-r--r--crypto/conf/conf_def.c2
-rw-r--r--crypto/conf/conf_mall.c18
2 files changed, 14 insertions, 6 deletions
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c
index 20b0760fcd..31f2766246 100644
--- a/crypto/conf/conf_def.c
+++ b/crypto/conf/conf_def.c
@@ -192,7 +192,7 @@ static int def_load(CONF *conf, const char *name, long *line)
#endif
if (in == NULL)
{
- if(ERR_GET_REASON(ERR_peek_top_error()) == BIO_R_NO_SUCH_FILE)
+ if (ERR_GET_REASON(ERR_peek_last_error()) == BIO_R_NO_SUCH_FILE)
CONFerr(CONF_F_CONF_LOAD,CONF_R_NO_SUCH_FILE);
else
CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB);
diff --git a/crypto/conf/conf_mall.c b/crypto/conf/conf_mall.c
index 59c7cfb966..01cff6946a 100644
--- a/crypto/conf/conf_mall.c
+++ b/crypto/conf/conf_mall.c
@@ -72,16 +72,18 @@ void OPENSSL_load_builtin_modules(void)
ENGINE_add_conf_module();
}
+#if 0 /* not yet */
/* This is the automatic configuration loader: it is called automatically by
* OpenSSL when any of a number of standard initialisation functions are called,
* unless this is overridden by calling OPENSSL_no_config()
*/
+#endif
static int openssl_configured = 0;
void OPENSSL_config(void)
{
- int ret;
+ int err_exit = 0;
char *file;
if (openssl_configured)
return;
@@ -92,10 +94,17 @@ void OPENSSL_config(void)
if (!file)
return;
- ret=CONF_modules_load_file(file, "openssl_config", 0) <= 0
- && ERR_GET_REASON(ERR_peek_top_error()) != CONF_R_NO_SUCH_FILE;
+ ERR_clear_error();
+ if (CONF_modules_load_file(file, "openssl_config", 0) <= 0)
+ {
+ if (ERR_GET_REASON(ERR_peek_last_error()) == CONF_R_NO_SUCH_FILE)
+ ERR_clear_error();
+ else
+ err_exit = 1;
+ }
+
OPENSSL_free(file);
- if (ret)
+ if (err_exit)
{
BIO *bio_err;
ERR_load_crypto_strings();
@@ -109,7 +118,6 @@ void OPENSSL_config(void)
}
return;
-
}
void OPENSSL_no_config()