Recognise Ultra Sparc and compiler version number.
[oweals/openssl.git] / apps / pkcs12.c
index 97b7c88ef952ed86222570b525dbc916996431d3..b056b8417234b1c886c595ec504e6934b299f71f 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <pem.h>
-#include <err.h>
-#include "pkcs12.h"
+#include <openssl/des.h>
+#include <openssl/pem.h>
+#include <openssl/err.h>
+#include <openssl/pkcs12.h>
 
 #include "apps.h"
 #define PROG pkcs12_main
@@ -76,7 +77,6 @@ EVP_CIPHER *enc;
 #define CLCERTS                0x8
 #define CACERTS                0x10
 
-#ifndef NOPROTO
 int get_cert_chain(X509 *cert, STACK **chain);
 int dump_certs_keys_p12(BIO *out, PKCS12 *p12, char *pass, int passlen, int options);
 int dump_certs_pkeys_bags(BIO *out, STACK *bags, char *pass, int passlen, int options);
@@ -85,17 +85,6 @@ int print_attribs(BIO *out, STACK *attrlst, char *name);
 void hex_prin(BIO *out, unsigned char *buf, int len);
 int alg_print(BIO *x, X509_ALGOR *alg);
 int cert_load(BIO *in, STACK *sk);
-#else
-int get_cert_chain();
-int dump_certs_keys_p12();
-int dump_certs_pkeys_bags();
-int dump_certs_pkeys_bag();
-int print_attribs();
-void hex_prin();
-int alg_print();
-int cert_load();
-#endif
-
 int MAIN(int argc, char **argv)
 {
     char *infile=NULL, *outfile=NULL, *keyname = NULL; 
@@ -649,8 +638,8 @@ int print_attribs (BIO *out, STACK *attrlst, char *name)
                        BIO_printf(out, ": ");
                } else BIO_printf(out, "%s: ", OBJ_nid2ln(attr_nid));
 
-               if(sk_num(attr->value.set)) {
-                       av = (ASN1_TYPE *)sk_value(attr->value.set, 0);
+               if(sk_ASN1_TYPE_num(attr->value.set)) {
+                       av = sk_ASN1_TYPE_value(attr->value.set, 0);
                        switch(av->type) {
                                case V_ASN1_BMPSTRING:
                                value = uni2asc(av->value.bmpstring->data,