diff options
Diffstat (limited to 'crypto/asn1/asn_pack.c')
-rw-r--r-- | crypto/asn1/asn_pack.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/crypto/asn1/asn_pack.c b/crypto/asn1/asn_pack.c index ea56aa6abe..e3535bc435 100644 --- a/crypto/asn1/asn_pack.c +++ b/crypto/asn1/asn_pack.c @@ -66,8 +66,9 @@ /* Turn an ASN1 encoded SEQUENCE OF into a STACK of structures */ -STACK *ASN1_seq_unpack(const unsigned char *buf, int len, char *(*d2i)(), - void (*free_func)(void *)) +STACK *ASN1_seq_unpack(const unsigned char *buf, int len, + char *(*d2i)(void **,const unsigned char **,long), + void (*free_func)(void *)) { STACK *sk; const unsigned char *pbuf; @@ -82,8 +83,8 @@ STACK *ASN1_seq_unpack(const unsigned char *buf, int len, char *(*d2i)(), * OPENSSL_malloc'ed buffer */ -unsigned char *ASN1_seq_pack(STACK *safes, int (*i2d)(), unsigned char **buf, - int *len) +unsigned char *ASN1_seq_pack(STACK *safes, int (*i2d)(void *,unsigned char **), + unsigned char **buf, int *len) { int safelen; unsigned char *safe, *p; @@ -106,9 +107,10 @@ unsigned char *ASN1_seq_pack(STACK *safes, int (*i2d)(), unsigned char **buf, /* Extract an ASN1 object from an ASN1_STRING */ -void *ASN1_unpack_string (ASN1_STRING *oct, char *(*d2i)()) +void *ASN1_unpack_string (ASN1_STRING *oct, + void *(*d2i)(void *,const unsigned char **,long)) { - unsigned char *p; + const unsigned char *p; char *ret; p = oct->data; @@ -119,7 +121,8 @@ void *ASN1_unpack_string (ASN1_STRING *oct, char *(*d2i)()) /* Pack an ASN1 object into an ASN1_STRING */ -ASN1_STRING *ASN1_pack_string(void *obj, int (*i2d)(), ASN1_STRING **oct) +ASN1_STRING *ASN1_pack_string(void *obj, int (*i2d)(void *,unsigned char **), + ASN1_STRING **oct) { unsigned char *p; ASN1_STRING *octmp; |