diff options
author | steve <steve> | 2001-06-28 11:41:35 +0000 |
---|---|---|
committer | steve <steve> | 2001-06-28 11:41:35 +0000 |
commit | 15eb5f08de95d5373824842bae43e81ba0c45527 (patch) | |
tree | 1e32bde173fd6095be14ea1410ded791b3e9e910 /apps/spkac.c | |
parent | b03b4401da7340074ecbc1e783c7e772e2c10cac (diff) | |
download | openssl-15eb5f08de95d5373824842bae43e81ba0c45527.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.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/spkac.c b/apps/spkac.c index 918efc0e5..d43dc9f3b 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); |