summaryrefslogtreecommitdiffstats
path: root/crypto/conf
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>1999-11-11 13:58:41 +0000
committerDr. Stephen Henson <steve@openssl.org>1999-11-11 13:58:41 +0000
commit53b1899e3cc0ef640643d52599ed94e6d89b20e1 (patch)
tree8bad2e0ab03916b0f9e8839794826ae56698d2a6 /crypto/conf
parent174a4a8c899fcb7f553e56c095613f47fde5dc43 (diff)
Fix a couple of outstanding issues: update STATUS file, fix NO_FP_API problems.
Update docs, change 'ca' to use the new callback parameter. Now moved key_callback into app.c because some other utilities will use it soon.
Diffstat (limited to 'crypto/conf')
-rw-r--r--crypto/conf/conf.c18
-rw-r--r--crypto/conf/conf.h2
2 files changed, 8 insertions, 12 deletions
diff --git a/crypto/conf/conf.c b/crypto/conf/conf.c
index 7d8b89168a..25b3ddfea9 100644
--- a/crypto/conf/conf.c
+++ b/crypto/conf/conf.c
@@ -86,28 +86,21 @@ const char *CONF_version="CONF" OPENSSL_VERSION_PTEXT;
LHASH *CONF_load(LHASH *h, const char *file, long *line)
{
LHASH *ltmp;
- FILE *in=NULL;
+ BIO *in=NULL;
-#ifdef VMS
- in=fopen(file,"r");
-#else
- in=fopen(file,"rb");
-#endif
+ in=BIO_new_file(file, "rb");
if (in == NULL)
{
- SYSerr(SYS_F_FOPEN,get_last_sys_error());
- ERR_set_error_data(BUF_strdup(file),
- ERR_TXT_MALLOCED|ERR_TXT_STRING);
CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB);
return NULL;
}
- ltmp = CONF_load_fp(h, in, line);
- fclose(in);
+ ltmp = CONF_load_bio(h, in, line);
+ BIO_free(in);
return ltmp;
}
-
+#ifndef NO_FP_API
LHASH *CONF_load_fp(LHASH *h, FILE *in, long *line)
{
BIO *btmp;
@@ -120,6 +113,7 @@ LHASH *CONF_load_fp(LHASH *h, FILE *in, long *line)
BIO_free(btmp);
return ltmp;
}
+#endif
LHASH *CONF_load_bio(LHASH *h, BIO *in, long *line)
{
diff --git a/crypto/conf/conf.h b/crypto/conf/conf.h
index e7c5150097..21831a92a3 100644
--- a/crypto/conf/conf.h
+++ b/crypto/conf/conf.h
@@ -78,7 +78,9 @@ typedef struct
DECLARE_STACK_OF(CONF_VALUE)
LHASH *CONF_load(LHASH *conf,const char *file,long *eline);
+#ifndef NO_FP_API
LHASH *CONF_load_fp(LHASH *conf, FILE *fp,long *eline);
+#endif
LHASH *CONF_load_bio(LHASH *conf, BIO *bp,long *eline);
STACK_OF(CONF_VALUE) *CONF_get_section(LHASH *conf,char *section);
char *CONF_get_string(LHASH *conf,char *group,char *name);