projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't attempt to parse nested ASN1 strings by default.
[oweals/openssl.git]
/
crypto
/
asn1
/
a_d2i_fp.c
diff --git
a/crypto/asn1/a_d2i_fp.c
b/crypto/asn1/a_d2i_fp.c
index b67b75e7c27e4ed14de233a4161af14ffcf989c9..e409c273f266560b72a2f649ef74a84d9400e818 100644
(file)
--- a/
crypto/asn1/a_d2i_fp.c
+++ b/
crypto/asn1/a_d2i_fp.c
@@
-66,11
+66,10
@@
static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb);
#ifndef NO_OLD_ASN1
#ifndef OPENSSL_NO_FP_API
#ifndef NO_OLD_ASN1
#ifndef OPENSSL_NO_FP_API
-char *ASN1_d2i_fp(char *(*xnew)(), char *(*d2i)(), FILE *in,
- unsigned char **x)
+void *ASN1_d2i_fp(void *(*xnew)(void), d2i_of_void *d2i, FILE *in, void **x)
{
BIO *b;
{
BIO *b;
-
char
*ret;
+
void
*ret;
if ((b=BIO_new(BIO_s_file())) == NULL)
{
if ((b=BIO_new(BIO_s_file())) == NULL)
{
@@
-84,12
+83,11
@@
char *ASN1_d2i_fp(char *(*xnew)(), char *(*d2i)(), FILE *in,
}
#endif
}
#endif
-char *ASN1_d2i_bio(char *(*xnew)(), char *(*d2i)(), BIO *in,
- unsigned char **x)
+void *ASN1_d2i_bio(void *(*xnew)(void), d2i_of_void *d2i, BIO *in, void **x)
{
BUF_MEM *b = NULL;
{
BUF_MEM *b = NULL;
- unsigned char *p;
-
char
*ret=NULL;
+
const
unsigned char *p;
+
void
*ret=NULL;
int len;
len = asn1_d2i_read_bio(in, &b);
int len;
len = asn1_d2i_read_bio(in, &b);
@@
-107,14
+105,14
@@
err:
void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x)
{
BUF_MEM *b = NULL;
void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x)
{
BUF_MEM *b = NULL;
- unsigned char *p;
+
const
unsigned char *p;
void *ret=NULL;
int len;
len = asn1_d2i_read_bio(in, &b);
if(len < 0) goto err;
void *ret=NULL;
int len;
len = asn1_d2i_read_bio(in, &b);
if(len < 0) goto err;
- p=(unsigned char *)b->data;
+ p=(
const
unsigned char *)b->data;
ret=ASN1_item_d2i(x,&p,len, it);
err:
if (b != NULL) BUF_MEM_free(b);
ret=ASN1_item_d2i(x,&p,len, it);
err:
if (b != NULL) BUF_MEM_free(b);
@@
-146,7
+144,7
@@
static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
unsigned char *p;
int i;
int ret=-1;
unsigned char *p;
int i;
int ret=-1;
- ASN1_CTX c;
+ ASN1_
const_
CTX c;
int want=HEADER_SIZE;
int eos=0;
#if defined(__GNUC__) && defined(__ia64)
int want=HEADER_SIZE;
int eos=0;
#if defined(__GNUC__) && defined(__ia64)
@@
-199,7
+197,7
@@
static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
if (e != ASN1_R_TOO_LONG)
goto err;
else
if (e != ASN1_R_TOO_LONG)
goto err;
else
- ERR_
get
_error(); /* clear error */
+ ERR_
clear
_error(); /* clear error */
}
i=c.p-p;/* header length */
off+=i; /* end of data */
}
i=c.p-p;/* header length */
off+=i; /* end of data */