From 5176ab31ca58949fc78b5b06b23adf63a83b9c44 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/lib/libtls/tls_ocsp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib/libtls/tls_ocsp.c') diff --git a/src/lib/libtls/tls_ocsp.c b/src/lib/libtls/tls_ocsp.c index c7eb3e5986..f7d7ba9199 100644 --- a/src/lib/libtls/tls_ocsp.c +++ b/src/lib/libtls/tls_ocsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_ocsp.c,v 1.24 2023/11/13 10:56:19 tb Exp $ */ +/* $OpenBSD: tls_ocsp.c,v 1.25 2024/03/24 11:30:12 beck Exp $ */ /* * Copyright (c) 2015 Marko Kreen * Copyright (c) 2016 Bob Beck @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -68,7 +69,7 @@ tls_ocsp_asn1_parse_time(struct tls *ctx, ASN1_GENERALIZEDTIME *gt, time_t *gt_t return -1; if (!ASN1_TIME_to_tm(gt, &tm)) return -1; - if ((*gt_time = timegm(&tm)) == -1) + if (!OPENSSL_timegm(&tm, gt_time)) return -1; return 0; } -- cgit v1.2.3-55-g6feb