Restore compability with kerberos/des.h (I had deleted some seemingly useless
[openssl.git] / apps / pkcs7.c
index cac75f48b2551f8cc89a696342d53112423e2aae..0e1427cc315513ac91a7ed82396828b1f8591f82 100644 (file)
 #include <string.h>
 #include <time.h>
 #include "apps.h"
-#include "err.h"
-#include "objects.h"
-#include "evp.h"
-#include "x509.h"
-#include "pkcs7.h"
-#include "pem.h"
+#include <openssl/err.h>
+#include <openssl/objects.h>
+#include <openssl/evp.h>
+#include <openssl/x509.h>
+#include <openssl/pkcs7.h>
+#include <openssl/pem.h>
 
 #undef PROG
 #define PROG   pkcs7_main
@@ -81,9 +81,7 @@
  * -print_certs
  */
 
-int MAIN(argc, argv)
-int argc;
-char **argv;
+int MAIN(int argc, char **argv)
        {
        PKCS7 *p7=NULL;
        int i,badops=0;
@@ -197,7 +195,7 @@ bad:
        if      (informat == FORMAT_ASN1)
                p7=d2i_PKCS7_bio(in,NULL);
        else if (informat == FORMAT_PEM)
-               p7=PEM_read_bio_PKCS7(in,NULL,NULL);
+               p7=PEM_read_bio_PKCS7(in,NULL,NULL,NULL);
        else
                {
                BIO_printf(bio_err,"bad input format specified for pkcs7 object\n");
@@ -224,7 +222,7 @@ bad:
        if (print_certs)
                {
                STACK_OF(X509) *certs=NULL;
-               STACK *crls=NULL;
+               STACK_OF(X509_CRL) *crls=NULL;
 
                i=OBJ_obj2nid(p7->type);
                switch (i)
@@ -268,9 +266,9 @@ bad:
                        {
                        X509_CRL *crl;
 
-                       for (i=0; i<sk_num(crls); i++)
+                       for (i=0; i<sk_X509_CRL_num(crls); i++)
                                {
-                               crl=(X509_CRL *)sk_value(crls,i);
+                               crl=sk_X509_CRL_value(crls,i);
 
                                X509_NAME_oneline(crl->crl->issuer,buf,256);
                                BIO_puts(out,"issuer= ");