OpenSSL 1.1.1-pre2
This commit is contained in:
@@ -13,8 +13,7 @@
|
||||
#include "internal/numbers.h"
|
||||
#include <openssl/buffer.h>
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb);
|
||||
#include "internal/asn1_int.h"
|
||||
|
||||
#ifndef NO_OLD_ASN1
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
@@ -26,12 +25,12 @@ void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x)
|
||||
|
||||
if ((b = BIO_new(BIO_s_file())) == NULL) {
|
||||
ASN1err(ASN1_F_ASN1_D2I_FP, ERR_R_BUF_LIB);
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
BIO_set_fp(b, in, BIO_NOCLOSE);
|
||||
ret = ASN1_d2i_bio(xnew, d2i, b, x);
|
||||
BIO_free(b);
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
# endif
|
||||
|
||||
@@ -50,7 +49,7 @@ void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x)
|
||||
ret = d2i(x, &p, len);
|
||||
err:
|
||||
BUF_MEM_free(b);
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -70,7 +69,7 @@ void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *x)
|
||||
ret = ASN1_item_d2i(x, &p, len, it);
|
||||
err:
|
||||
BUF_MEM_free(b);
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
@@ -81,18 +80,18 @@ void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x)
|
||||
|
||||
if ((b = BIO_new(BIO_s_file())) == NULL) {
|
||||
ASN1err(ASN1_F_ASN1_ITEM_D2I_FP, ERR_R_BUF_LIB);
|
||||
return (NULL);
|
||||
return NULL;
|
||||
}
|
||||
BIO_set_fp(b, in, BIO_NOCLOSE);
|
||||
ret = ASN1_item_d2i_bio(it, b, x);
|
||||
BIO_free(b);
|
||||
return (ret);
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define HEADER_SIZE 8
|
||||
#define ASN1_CHUNK_INITIAL_SIZE (16 * 1024)
|
||||
static int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
||||
int asn1_d2i_read_bio(BIO *in, BUF_MEM **pb)
|
||||
{
|
||||
BUF_MEM *b;
|
||||
unsigned char *p;
|
||||
|
||||
Reference in New Issue
Block a user