aboutsummaryrefslogtreecommitdiffstats
path: root/apps/ca.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2000-06-22 22:07:27 +0000
committerRichard Levitte <levitte@openssl.org>2000-06-22 22:07:27 +0000
commit431b0cce7daf8f1d94fdb0fa304cbee5b2c96163 (patch)
treecf30bd8c7c848e832291e75599fdf2c4351626fc /apps/ca.c
parent1023b1220ee4f25ff424fa018d7420b668958a3e (diff)
downloadopenssl-431b0cce7daf8f1d94fdb0fa304cbee5b2c96163.tar.gz
Move add_oid_section to apps.c, so it can be shared by several
applications. Also, have it and the certificate and key loading functions take a BIO argument for error output.
Diffstat (limited to 'apps/ca.c')
-rw-r--r--apps/ca.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/apps/ca.c b/apps/ca.c
index 69352654e2..d28cde99d8 100644
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -176,7 +176,6 @@ extern int EF_PROTECT_BELOW;
extern int EF_ALIGNMENT;
#endif
-static int add_oid_section(LHASH *conf);
static void lookup_fail(char *name,char *tag);
static unsigned long index_serial_hash(char **a);
static int index_serial_cmp(char **a, char **b);
@@ -498,7 +497,7 @@ bad:
BIO_free(oid_bio);
}
}
- if(!add_oid_section(conf))
+ if(!add_oid_section(bio_err,conf))
{
ERR_print_errors(bio_err);
goto err;
@@ -2100,28 +2099,6 @@ static int check_time_format(char *str)
return(ASN1_UTCTIME_check(&tm));
}
-static int add_oid_section(LHASH *hconf)
-{
- char *p;
- STACK_OF(CONF_VALUE) *sktmp;
- CONF_VALUE *cnf;
- int i;
- if(!(p=CONF_get_string(hconf,NULL,"oid_section"))) return 1;
- if(!(sktmp = CONF_get_section(hconf, p))) {
- BIO_printf(bio_err, "problem loading oid section %s\n", p);
- return 0;
- }
- for(i = 0; i < sk_CONF_VALUE_num(sktmp); i++) {
- cnf = sk_CONF_VALUE_value(sktmp, i);
- if(OBJ_create(cnf->value, cnf->name, cnf->name) == NID_undef) {
- BIO_printf(bio_err, "problem creating object %s=%s\n",
- cnf->name, cnf->value);
- return 0;
- }
- }
- return 1;
-}
-
static int do_revoke(X509 *x509, TXT_DB *db)
{
ASN1_UTCTIME *tm=NULL, *revtm=NULL;