summaryrefslogtreecommitdiff
path: root/src/usr.sbin
diff options
context:
space:
mode:
authorbeck <>2024-03-24 11:30:12 +0000
committerbeck <>2024-03-24 11:30:12 +0000
commit0f167a53fa3e19b7e6bb0620e16c6d11f07f10ca (patch)
treeaf867a635253990b4a88720849f04a8a6bb5d8b3 /src/usr.sbin
parenta1fcde383f7ab72e64fc36b664d4358d5915f2c1 (diff)
downloadopenbsd-0f167a53fa3e19b7e6bb0620e16c6d11f07f10ca.tar.gz
openbsd-0f167a53fa3e19b7e6bb0620e16c6d11f07f10ca.tar.bz2
openbsd-0f167a53fa3e19b7e6bb0620e16c6d11f07f10ca.zip
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@
Diffstat (limited to 'src/usr.sbin')
-rw-r--r--src/usr.sbin/ocspcheck/ocspcheck.c5
1 files changed, 3 insertions, 2 deletions
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 @@
1/* $OpenBSD: ocspcheck.c,v 1.32 2023/11/13 11:46:24 tb Exp $ */ 1/* $OpenBSD: ocspcheck.c,v 1.33 2024/03/24 11:30:12 beck 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>
@@ -34,6 +34,7 @@
34 34
35#include <openssl/err.h> 35#include <openssl/err.h>
36#include <openssl/ocsp.h> 36#include <openssl/ocsp.h>
37#include <openssl/posix_time.h>
37#include <openssl/ssl.h> 38#include <openssl/ssl.h>
38 39
39#include "http.h" 40#include "http.h"
@@ -193,7 +194,7 @@ parse_ocsp_time(ASN1_GENERALIZEDTIME *gt)
193 return -1; 194 return -1;
194 if (!ASN1_TIME_to_tm(gt, &tm)) 195 if (!ASN1_TIME_to_tm(gt, &tm))
195 return -1; 196 return -1;
196 if ((rv = timegm(&tm)) == -1) 197 if (!OPENSSL_timegm(&tm, &rv))
197 return -1; 198 return -1;
198 return rv; 199 return rv;
199} 200}