diff options
author | Ralf S. Engelschall <rse@openssl.org> | 1999-05-04 08:56:51 +0000 |
---|---|---|
committer | Ralf S. Engelschall <rse@openssl.org> | 1999-05-04 08:56:51 +0000 |
commit | 20b85fdd7644aa940e50a158a1b2c8010bb36443 (patch) | |
tree | 7ac94407e4e58de9fadc718886fbc62ca0972800 /apps/crl2p7.c | |
parent | 0f3e6045898e9aa5d0249e61c874b1f153ae54fa (diff) | |
download | openssl-20b85fdd7644aa940e50a158a1b2c8010bb36443.tar.gz |
Convert casted X509_INFO stacks to type-safe STACK_OF(X509_INFO).
PS: Feel free to move the IMPLEMENT_STACK_OF(X509_INFO) from
crypto/asn1/x_info.c to any other place where you think it fits better.
X509_INFO is a structure slightly spreaded over ASN.1, X509 and PEM code,
so I found no definitive location for IMPLEMENT_STACK_OF(X509_INFO). In
crypto/asn1/x_info.c it's at least now bundled with X509_INFO_new() and
friends.
Diffstat (limited to 'apps/crl2p7.c')
-rw-r--r-- | apps/crl2p7.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/crl2p7.c b/apps/crl2p7.c index 611046ecf5..ba4eba16bf 100644 --- a/apps/crl2p7.c +++ b/apps/crl2p7.c @@ -287,7 +287,7 @@ static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile) BIO *in=NULL; int count=0; int ret= -1; - STACK *sk=NULL; + STACK_OF(X509_INFO) *sk=NULL; X509_INFO *xi; if ((stat(certfile,&st) != 0)) @@ -311,9 +311,9 @@ static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile) } /* scan over it and pull out the CRL's */ - while (sk_num(sk)) + while (sk_X509_INFO_num(sk)) { - xi=(X509_INFO *)sk_shift(sk); + xi=sk_X509_INFO_shift(sk); if (xi->x509 != NULL) { sk_X509_push(stack,xi->x509); @@ -327,7 +327,7 @@ static int add_certs_from_file(STACK_OF(X509) *stack, char *certfile) end: /* never need to Free x */ if (in != NULL) BIO_free(in); - if (sk != NULL) sk_free(sk); + if (sk != NULL) sk_X509_INFO_free(sk); return(ret); } |