diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/tasn_dec.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/tasn_dec.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c index 235685484c..22d8006d0a 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.78 2022/06/29 08:56:44 beck Exp $ */ | 1 | /* $OpenBSD: tasn_dec.c,v 1.79 2022/09/03 18:45:51 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 | */ |
| @@ -277,7 +277,6 @@ static int | |||
| 277 | asn1_c2i_primitive(ASN1_VALUE **pval, CBS *content, int utype, const ASN1_ITEM *it) | 277 | asn1_c2i_primitive(ASN1_VALUE **pval, CBS *content, int utype, const ASN1_ITEM *it) |
| 278 | { | 278 | { |
| 279 | ASN1_STRING *stmp; | 279 | ASN1_STRING *stmp; |
| 280 | ASN1_INTEGER **tint; | ||
| 281 | ASN1_BOOLEAN *tbool; | 280 | ASN1_BOOLEAN *tbool; |
| 282 | uint8_t u8val; | 281 | uint8_t u8val; |
| 283 | int ret = 0; | 282 | int ret = 0; |
| @@ -318,13 +317,14 @@ asn1_c2i_primitive(ASN1_VALUE **pval, CBS *content, int utype, const ASN1_ITEM * | |||
| 318 | goto err; | 317 | goto err; |
| 319 | break; | 318 | break; |
| 320 | 319 | ||
| 321 | case V_ASN1_INTEGER: | ||
| 322 | case V_ASN1_ENUMERATED: | 320 | case V_ASN1_ENUMERATED: |
| 323 | tint = (ASN1_INTEGER **)pval; | 321 | if (!c2i_ASN1_ENUMERATED_cbs((ASN1_ENUMERATED **)pval, content)) |
| 324 | if (!c2i_ASN1_INTEGER_cbs(tint, content)) | 322 | goto err; |
| 323 | break; | ||
| 324 | |||
| 325 | case V_ASN1_INTEGER: | ||
| 326 | if (!c2i_ASN1_INTEGER_cbs((ASN1_INTEGER **)pval, content)) | ||
| 325 | goto err; | 327 | goto err; |
| 326 | /* Fixup type to match the expected form */ | ||
| 327 | (*tint)->type = utype | ((*tint)->type & V_ASN1_NEG); | ||
| 328 | break; | 328 | break; |
| 329 | 329 | ||
| 330 | case V_ASN1_OCTET_STRING: | 330 | case V_ASN1_OCTET_STRING: |
