static int add_oid_section(LHASH *conf);
static void lookup_fail(char *name,char *tag);
-static int MS_CALLBACK key_callback(char *buf,int len,int verify,void *u);
static unsigned long index_serial_hash(char **a);
static int index_serial_cmp(char **a, char **b);
static unsigned long index_name_hash(char **a);
static int do_revoke(X509 *x509, TXT_DB *db);
static int check_time_format(char *str);
static LHASH *conf=NULL;
-static char *key=NULL;
static char *section=NULL;
static int preserve=0;
int MAIN(int argc, char **argv)
{
+ char *key=NULL;
int total=0;
int total_done=0;
int badops=0;
#undef BSIZE
#define BSIZE 256
MS_STATIC char buf[3][BSIZE];
- char *randfile;
+ char *randfile=NULL;
#ifdef EFENCE
EF_PROTECT_FREE=1;
key = NULL;
section = NULL;
- X509V3_add_standard_extensions();
-
preserve=0;
msie_hack=0;
if (bio_err == NULL)
BIO_printf(bio_err,"trying to load CA private key\n");
goto err;
}
- if (key == NULL)
- pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,NULL);
- else
- {
- pkey=PEM_read_bio_PrivateKey(in,NULL,key_callback,NULL);
- memset(key,0,strlen(key));
- }
+ pkey=PEM_read_bio_PrivateKey(in,NULL,PEM_cb,key);
+ if(key) memset(key,0,strlen(key));
if (pkey == NULL)
{
BIO_printf(bio_err,"unable to load CA private key\n");
X509_free(x509);
X509_CRL_free(crl);
CONF_free(conf);
- X509V3_EXT_cleanup();
OBJ_cleanup();
EXIT(ret);
}
BIO_printf(bio_err,"variable lookup failed for %s::%s\n",name,tag);
}
-static int MS_CALLBACK key_callback(char *buf, int len, int verify, void *u)
- {
- int i;
-
- if (key == NULL) return(0);
- i=strlen(key);
- i=(i > len)?len:i;
- memcpy(buf,key,i);
- return(i);
- }
-
static unsigned long index_serial_hash(char **a)
{
char *n;