summaryrefslogtreecommitdiff
path: root/apps/spkac.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2001-06-28 11:41:50 +0000
committerDr. Stephen Henson <steve@openssl.org>2001-06-28 11:41:50 +0000
commitb7a26e6dafdbf97513e968a45757a4d4e9843ba2 (patch)
treedbfa985f73c77ab5048d5514bd83e1711768a475 /apps/spkac.c
parentce16450a894b29ffda9e2a60bc62f89aa841d1ea (diff)
downloadopenssl-new-b7a26e6dafdbf97513e968a45757a4d4e9843ba2.tar.gz
Modify apps to use NCONF code instead of old CONF code.
Add new extension functions which work with NCONF. Tidy up extension config routines and remove redundant code. Fix NCONF_get_number(). Todo: more testing of apps to see they still work...
Diffstat (limited to 'apps/spkac.c')
-rw-r--r--apps/spkac.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/spkac.c b/apps/spkac.c
index 918efc0e5a..d43dc9f3b9 100644
--- a/apps/spkac.c
+++ b/apps/spkac.c
@@ -90,7 +90,7 @@ int MAIN(int argc, char **argv)
char *passargin = NULL, *passin = NULL;
char *spkac = "SPKAC", *spksect = "default", *spkstr = NULL;
char *challenge = NULL, *keyfile = NULL;
- LHASH *conf = NULL;
+ CONF *conf = NULL;
NETSCAPE_SPKI *spki = NULL;
EVP_PKEY *pkey = NULL;
char *engine=NULL;
@@ -228,15 +228,16 @@ bad:
goto end;
}
- conf = CONF_load_bio(NULL, in, NULL);
+ conf = NCONF_new(NULL);
+ i = NCONF_load_bio(conf, in, NULL);
- if(!conf) {
+ if(!i) {
BIO_printf(bio_err, "Error parsing config file\n");
ERR_print_errors(bio_err);
goto end;
}
- spkstr = CONF_get_string(conf, spksect, spkac);
+ spkstr = NCONF_get_string(conf, spksect, spkac);
if(!spkstr) {
BIO_printf(bio_err, "Can't find SPKAC called \"%s\"\n", spkac);
@@ -285,7 +286,7 @@ bad:
ret = 0;
end:
- CONF_free(conf);
+ NCONF_free(conf);
NETSCAPE_SPKI_free(spki);
BIO_free(in);
BIO_free_all(out);