#include <stdio.h>
#include "cryptlib.h"
-#include "asn1.h"
+#include <openssl/asn1.h>
/* ASN1 packing and unpacking functions */
/* Turn an ASN1 encoded SEQUENCE OF into a STACK of structures */
-STACK *ASN1_seq_unpack(buf, len, d2i, free_func)
-unsigned char *buf;
-int len;
-char *(*d2i)();
-void (*free_func)();
+STACK *ASN1_seq_unpack(unsigned char *buf, int len, char *(*d2i)(),
+ void (*free_func)())
{
STACK *sk;
unsigned char *pbuf;
* Malloc'ed buffer
*/
-unsigned char *ASN1_seq_pack(safes, i2d, buf, len)
-STACK *safes;
-int (*i2d)();
-unsigned char **buf;
-int *len;
+unsigned char *ASN1_seq_pack(STACK *safes, int (*i2d)(), unsigned char **buf,
+ int *len)
{
int safelen;
unsigned char *safe, *p;
/* Extract an ASN1 object from an ASN1_STRING */
-char *ASN1_unpack_string (oct, d2i)
-ASN1_STRING *oct;
-char *(*d2i)();
+char *ASN1_unpack_string (ASN1_STRING *oct, char *(*d2i)())
{
unsigned char *p;
char *ret;
/* Pack an ASN1 object into an ASN1_STRING */
-ASN1_STRING *ASN1_pack_string (obj, i2d, oct)
-char *obj;
-int (*i2d)();
-ASN1_STRING **oct;
+ASN1_STRING *ASN1_pack_string (char *obj, int (*i2d)(), ASN1_STRING **oct)
{
unsigned char *p;
ASN1_STRING *octmp;