diff options
author | jsing <> | 2021-12-03 17:22:10 +0000 |
---|---|---|
committer | jsing <> | 2021-12-03 17:22:10 +0000 |
commit | 909b77020d8852e0dd17d6969cfd444bca07bc0a (patch) | |
tree | a4346a2969195fe3592c72c977beac5bd6d091b6 | |
parent | 71a63cb5a08d9412085831434e6af134e801b560 (diff) | |
download | openbsd-909b77020d8852e0dd17d6969cfd444bca07bc0a.tar.gz openbsd-909b77020d8852e0dd17d6969cfd444bca07bc0a.tar.bz2 openbsd-909b77020d8852e0dd17d6969cfd444bca07bc0a.zip |
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-- | src/lib/libcrypto/asn1/tasn_dec.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c index 4b08e90404..beeff8089a 100644 --- a/src/lib/libcrypto/asn1/tasn_dec.c +++ b/src/lib/libcrypto/asn1/tasn_dec.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tasn_dec.c,v 1.38 2020/12/08 15:06:42 tb Exp $ */ | 1 | /* $OpenBSD: tasn_dec.c,v 1.39 2021/12/03 17:22:10 jsing Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -83,6 +83,9 @@ static int asn1_check_tlen(long *olen, int *otag, unsigned char *oclass, | |||
83 | char *inf, char *cst, const unsigned char **in, long len, int exptag, | 83 | char *inf, char *cst, const unsigned char **in, long len, int exptag, |
84 | int expclass, char opt, ASN1_TLC *ctx); | 84 | int expclass, char opt, ASN1_TLC *ctx); |
85 | 85 | ||
86 | static int asn1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, | ||
87 | long len, const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx, | ||
88 | int depth); | ||
86 | static int asn1_template_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, | 89 | static int asn1_template_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, |
87 | long len, const ASN1_TEMPLATE *tt, char opt, ASN1_TLC *ctx, int depth); | 90 | long len, const ASN1_TEMPLATE *tt, char opt, ASN1_TLC *ctx, int depth); |
88 | static int asn1_template_noexp_d2i(ASN1_VALUE **val, const unsigned char **in, | 91 | 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, | |||
136 | if (!pval) | 139 | if (!pval) |
137 | pval = &ptmpval; | 140 | pval = &ptmpval; |
138 | asn1_tlc_clear_nc(&c); | 141 | asn1_tlc_clear_nc(&c); |
139 | if (ASN1_item_ex_d2i(pval, in, len, it, -1, 0, 0, &c) > 0) | 142 | if (asn1_item_ex_d2i(pval, in, len, it, -1, 0, 0, &c, 0) > 0) |
140 | return *pval; | 143 | return *pval; |
141 | return NULL; | 144 | return NULL; |
142 | } | 145 | } |