summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2021-12-03 17:22:11 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2021-12-03 17:22:11 +0000
commita17cec85470aa7d2838fc968ce67761f653aa770 (patch)
treeeb63703172e10d14b6ff104a97257db8484a5c12
parenta1d5abe1d502f970a79317fe1811cb26827aeb98 (diff)
Call asn1_item_ex_d2i() directly from ASN1_item_d2i()
ASN1_item_ex_d2i() is just a wrapper around the internal asn1_item_ex_d2i() function, so call asn1_item_ex_d2i() directly. ok inoguchi@ tb@
-rw-r--r--lib/libcrypto/asn1/tasn_dec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libcrypto/asn1/tasn_dec.c b/lib/libcrypto/asn1/tasn_dec.c
index 4b08e90404a..beeff8089ae 100644
--- a/lib/libcrypto/asn1/tasn_dec.c
+++ b/lib/libcrypto/asn1/tasn_dec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tasn_dec.c,v 1.38 2020/12/08 15:06:42 tb Exp $ */
+/* $OpenBSD: tasn_dec.c,v 1.39 2021/12/03 17:22:10 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -83,6 +83,9 @@ static int asn1_check_tlen(long *olen, int *otag, unsigned char *oclass,
char *inf, char *cst, const unsigned char **in, long len, int exptag,
int expclass, char opt, ASN1_TLC *ctx);
+static int asn1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in,
+ long len, const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx,
+ int depth);
static int asn1_template_ex_d2i(ASN1_VALUE **pval, const unsigned char **in,
long len, const ASN1_TEMPLATE *tt, char opt, ASN1_TLC *ctx, int depth);
static int asn1_template_noexp_d2i(ASN1_VALUE **val, const unsigned char **in,
@@ -136,7 +139,7 @@ ASN1_item_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
if (!pval)
pval = &ptmpval;
asn1_tlc_clear_nc(&c);
- if (ASN1_item_ex_d2i(pval, in, len, it, -1, 0, 0, &c) > 0)
+ if (asn1_item_ex_d2i(pval, in, len, it, -1, 0, 0, &c, 0) > 0)
return *pval;
return NULL;
}