summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/usr.sbin/ocspcheck/ocspcheck.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/usr.sbin/ocspcheck/ocspcheck.c b/src/usr.sbin/ocspcheck/ocspcheck.c
index 516642b53f..234f3d22f6 100644
--- a/src/usr.sbin/ocspcheck/ocspcheck.c
+++ b/src/usr.sbin/ocspcheck/ocspcheck.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ocspcheck.c,v 1.31 2022/12/28 21:30:17 jmc Exp $ */ 1/* $OpenBSD: ocspcheck.c,v 1.32 2023/11/13 11:46:24 tb Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2017,2020 Bob Beck <beck@openbsd.org> 4 * Copyright (c) 2017,2020 Bob Beck <beck@openbsd.org>
@@ -189,8 +189,9 @@ parse_ocsp_time(ASN1_GENERALIZEDTIME *gt)
189 if (gt == NULL) 189 if (gt == NULL)
190 return -1; 190 return -1;
191 /* RFC 6960 specifies that all times in OCSP must be GENERALIZEDTIME */ 191 /* RFC 6960 specifies that all times in OCSP must be GENERALIZEDTIME */
192 if (ASN1_time_parse(gt->data, gt->length, &tm, 192 if (!ASN1_GENERALIZEDTIME_check(gt))
193 V_ASN1_GENERALIZEDTIME) == -1) 193 return -1;
194 if (!ASN1_TIME_to_tm(gt, &tm))
194 return -1; 195 return -1;
195 if ((rv = timegm(&tm)) == -1) 196 if ((rv = timegm(&tm)) == -1)
196 return -1; 197 return -1;