diff options
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_dec.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_dec.c b/src/lib/libcrypto/asn1/tasn_dec.c index 375425a9f2..235685484c 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.77 2022/06/25 17:43:56 jsing Exp $ */ | 1 | /* $OpenBSD: tasn_dec.c,v 1.78 2022/06/29 08:56:44 beck 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 | */ |
@@ -353,6 +353,13 @@ asn1_c2i_primitive(ASN1_VALUE **pval, CBS *content, int utype, const ASN1_ITEM * | |||
353 | ASN1error(ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH); | 353 | ASN1error(ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH); |
354 | goto err; | 354 | goto err; |
355 | } | 355 | } |
356 | if (utype == V_ASN1_UTCTIME || utype == V_ASN1_GENERALIZEDTIME) { | ||
357 | if (!asn1_time_parse_cbs(content, | ||
358 | utype == V_ASN1_GENERALIZEDTIME, NULL)) { | ||
359 | ASN1error(ASN1_R_INVALID_TIME_FORMAT); | ||
360 | goto err; | ||
361 | } | ||
362 | } | ||
356 | /* All based on ASN1_STRING and handled the same way. */ | 363 | /* All based on ASN1_STRING and handled the same way. */ |
357 | if (*pval == NULL) { | 364 | if (*pval == NULL) { |
358 | if ((stmp = ASN1_STRING_type_new(utype)) == NULL) { | 365 | if ((stmp = ASN1_STRING_type_new(utype)) == NULL) { |