diff options
| author | June McEnroe <june@causal.agency> | 2026-06-01 14:39:52 -0400 |
|---|---|---|
| committer | June McEnroe <june@causal.agency> | 2026-06-01 14:39:52 -0400 |
| commit | 8de0a43b1db624a766efd3d78a60403e77ce39e0 (patch) | |
| tree | 630a8490c3773b78d50582691dff4d9c60a607d4 /tls_ocsp.c | |
| parent | Import LibreSSL 3.8.4 (diff) | |
| download | libretls-8de0a43b1db624a766efd3d78a60403e77ce39e0.tar.gz libretls-8de0a43b1db624a766efd3d78a60403e77ce39e0.zip | |
Import LibreSSL 3.9.0
Diffstat (limited to 'tls_ocsp.c')
| -rw-r--r-- | tls_ocsp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tls_ocsp.c b/tls_ocsp.c index acf6935..c7eb3e5 100644 --- a/tls_ocsp.c +++ b/tls_ocsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_ocsp.c,v 1.23 2023/05/14 07:26:25 op Exp $ */ +/* $OpenBSD: tls_ocsp.c,v 1.24 2023/11/13 10:56:19 tb Exp $ */ /* * Copyright (c) 2015 Marko Kreen <markokr@gmail.com> * Copyright (c) 2016 Bob Beck <beck@openbsd.org> @@ -64,8 +64,9 @@ tls_ocsp_asn1_parse_time(struct tls *ctx, ASN1_GENERALIZEDTIME *gt, time_t *gt_t if (gt == NULL) return -1; /* RFC 6960 specifies that all times in OCSP must be GENERALIZEDTIME */ - if (ASN1_time_parse(gt->data, gt->length, &tm, - V_ASN1_GENERALIZEDTIME) == -1) + if (!ASN1_GENERALIZEDTIME_check(gt)) + return -1; + if (!ASN1_TIME_to_tm(gt, &tm)) return -1; if ((*gt_time = timegm(&tm)) == -1) return -1; |