#include <stdio.h>
#include "cryptlib.h"
-#include "buffer.h"
-#include "objects.h"
-#include "x509.h"
+#include <openssl/buffer.h>
+#include <openssl/objects.h>
+#include <openssl/asn1.h>
-#ifndef NOPROTO
static int asn1_print_info(BIO *bp, int tag, int xclass,int constructed,
int indent);
static int asn1_parse2(BIO *bp, unsigned char **pp, long length,
int offset, int depth, int indent);
-#else
-static int asn1_print_info();
-static int asn1_parse2();
-#endif
-
-static int asn1_print_info(bp, tag, xclass, constructed,indent)
-BIO *bp;
-int tag;
-int xclass;
-int constructed;
-int indent;
+static int asn1_print_info(BIO *bp, int tag, int xclass, int constructed,
+ int indent)
{
static const char fmt[]="%-18s";
static const char fmt2[]="%2d %-15s";
p="GENERALIZEDTIME";
else if (tag == V_ASN1_GRAPHICSTRING)
p="GRAPHICSTRING";
- else if (tag == V_ASN1_ISO64STRING)
- p="ISO64STRING";
+ else if (tag == V_ASN1_VISIBLESTRING)
+ p="VISIBLESTRING";
else if (tag == V_ASN1_GENERALSTRING)
p="GENERALSTRING";
else if (tag == V_ASN1_UNIVERSALSTRING)
return(0);
}
-int ASN1_parse(bp, pp, len, indent)
-BIO *bp;
-unsigned char *pp;
-long len;
-int indent;
+int ASN1_parse(BIO *bp, unsigned char *pp, long len, int indent)
{
return(asn1_parse2(bp,&pp,len,0,0,indent));
}
-static int asn1_parse2(bp, pp, length, offset, depth, indent)
-BIO *bp;
-unsigned char **pp;
-long length;
-int offset;
-int depth;
-int indent;
+static int asn1_parse2(BIO *bp, unsigned char **pp, long length, int offset,
+ int depth, int indent)
{
unsigned char *p,*ep,*tot,*op,*opp;
long len;
if ( (tag == V_ASN1_PRINTABLESTRING) ||
(tag == V_ASN1_T61STRING) ||
(tag == V_ASN1_IA5STRING) ||
+ (tag == V_ASN1_VISIBLESTRING) ||
(tag == V_ASN1_UTCTIME) ||
(tag == V_ASN1_GENERALIZEDTIME))
{