From 0f167a53fa3e19b7e6bb0620e16c6d11f07f10ca Mon Sep 17 00:00:00 2001 From: beck <> Date: Sun, 24 Mar 2024 11:30:12 +0000 Subject: Convert libressl to use the BoringSSL style time conversions This gets rid of our last uses of timegm and gmtime in the library and things that ship with it. It includes a bit of refactoring in ocsp_cl.c to remove some obvious ugly. ok tb@ --- src/usr.sbin/ocspcheck/ocspcheck.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/usr.sbin') diff --git a/src/usr.sbin/ocspcheck/ocspcheck.c b/src/usr.sbin/ocspcheck/ocspcheck.c index 234f3d22f6..9739e398e8 100644 --- a/src/usr.sbin/ocspcheck/ocspcheck.c +++ b/src/usr.sbin/ocspcheck/ocspcheck.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocspcheck.c,v 1.32 2023/11/13 11:46:24 tb Exp $ */ +/* $OpenBSD: ocspcheck.c,v 1.33 2024/03/24 11:30:12 beck Exp $ */ /* * Copyright (c) 2017,2020 Bob Beck @@ -34,6 +34,7 @@ #include #include +#include #include #include "http.h" @@ -193,7 +194,7 @@ parse_ocsp_time(ASN1_GENERALIZEDTIME *gt) return -1; if (!ASN1_TIME_to_tm(gt, &tm)) return -1; - if ((rv = timegm(&tm)) == -1) + if (!OPENSSL_timegm(&tm, &rv)) return -1; return rv; } -- cgit v1.2.3-55-g6feb