summaryrefslogtreecommitdiff
path: root/deps/openssl/openssl/crypto/asn1/a_d2i_fp.c
diff options
context:
space:
mode:
Diffstat (limited to 'deps/openssl/openssl/crypto/asn1/a_d2i_fp.c')
-rw-r--r--deps/openssl/openssl/crypto/asn1/a_d2i_fp.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/deps/openssl/openssl/crypto/asn1/a_d2i_fp.c b/deps/openssl/openssl/crypto/asn1/a_d2i_fp.c
index e5c1d0ed70..a1a17901b8 100644
--- a/deps/openssl/openssl/crypto/asn1/a_d2i_fp.c
+++ b/deps/openssl/openssl/crypto/asn1/a_d2i_fp.c
@@ -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;