diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2001-06-28 13:41:50 +0200 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2001-06-28 13:41:50 +0200 |
commit | b7a26e6dafdbf97513e968a45757a4d4e9843ba2 (patch) | |
tree | dbfa985f73c77ab5048d5514bd83e1711768a475 /apps/spkac.c | |
parent | Make better use of load_cert, load_certs and load_key. (diff) | |
download | openssl-b7a26e6dafdbf97513e968a45757a4d4e9843ba2.tar.xz openssl-b7a26e6dafdbf97513e968a45757a4d4e9843ba2.zip |
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 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); |