diff options
author | Ben Laurie <ben@openssl.org> | 2000-05-16 14:38:29 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2000-05-16 14:38:29 +0000 |
commit | b4604683fa66963af4596aff7517c3a009ba7087 (patch) | |
tree | 56a2ca07c01833653ea530fa75953915be08980c /apps/ca.c | |
parent | 0e1c06128adbfd2d88dc304db2262140bad045fd (diff) | |
download | openssl-b4604683fa66963af4596aff7517c3a009ba7087.tar.gz |
Typesafety thought police.
Diffstat (limited to 'apps/ca.c')
-rw-r--r-- | apps/ca.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -263,7 +263,7 @@ int MAIN(int argc, char **argv) long l; const EVP_MD *dgst=NULL; STACK_OF(CONF_VALUE) *attribs=NULL; - STACK *cert_sk=NULL; + STACK_OF(X509) *cert_sk=NULL; BIO *hex=NULL; #undef BSIZE #define BSIZE 256 @@ -817,7 +817,7 @@ bad: goto err; } - if ((cert_sk=sk_new_null()) == NULL) + if ((cert_sk=sk_X509_new_null()) == NULL) { BIO_printf(bio_err,"Malloc failure\n"); goto err; @@ -834,7 +834,7 @@ bad: total_done++; BIO_printf(bio_err,"\n"); if (!BN_add_word(serial,1)) goto err; - if (!sk_push(cert_sk,(char *)x)) + if (!sk_X509_push(cert_sk,x)) { BIO_printf(bio_err,"Malloc failure\n"); goto err; @@ -858,7 +858,7 @@ bad: total_done++; BIO_printf(bio_err,"\n"); if (!BN_add_word(serial,1)) goto err; - if (!sk_push(cert_sk,(char *)x)) + if (!sk_X509_push(cert_sk,x)) { BIO_printf(bio_err,"Malloc failure\n"); goto err; @@ -877,7 +877,7 @@ bad: total_done++; BIO_printf(bio_err,"\n"); if (!BN_add_word(serial,1)) goto err; - if (!sk_push(cert_sk,(char *)x)) + if (!sk_X509_push(cert_sk,x)) { BIO_printf(bio_err,"Malloc failure\n"); goto err; @@ -896,7 +896,7 @@ bad: total_done++; BIO_printf(bio_err,"\n"); if (!BN_add_word(serial,1)) goto err; - if (!sk_push(cert_sk,(char *)x)) + if (!sk_X509_push(cert_sk,x)) { BIO_printf(bio_err,"Malloc failure\n"); goto err; @@ -907,7 +907,7 @@ bad: * and a data base and serial number that need * updating */ - if (sk_num(cert_sk) > 0) + if (sk_X509_num(cert_sk) > 0) { if (!batch) { @@ -923,7 +923,7 @@ bad: } } - BIO_printf(bio_err,"Write out database with %d new entries\n",sk_num(cert_sk)); + BIO_printf(bio_err,"Write out database with %d new entries\n",sk_X509_num(cert_sk)); strncpy(buf[0],serialfile,BSIZE-4); @@ -955,12 +955,12 @@ bad: if (verbose) BIO_printf(bio_err,"writing new certificates\n"); - for (i=0; i<sk_num(cert_sk); i++) + for (i=0; i<sk_X509_num(cert_sk); i++) { int k; unsigned char *n; - x=(X509 *)sk_value(cert_sk,i); + x=sk_X509_value(cert_sk,i); j=x->cert_info->serialNumber->length; p=(char *)x->cert_info->serialNumber->data; @@ -999,7 +999,7 @@ bad: write_new_certificate(Sout,x, output_der, notext); } - if (sk_num(cert_sk)) + if (sk_X509_num(cert_sk)) { /* Rename the database and the serial file */ strncpy(buf[2],serialfile,BSIZE-4); @@ -1233,7 +1233,7 @@ err: BIO_free(out); BIO_free(in); - sk_pop_free(cert_sk, (void(*)(void *)) X509_free); + sk_X509_pop_free(cert_sk,X509_free); if (ret) ERR_print_errors(bio_err); app_RAND_write_file(randfile, bio_err); |