diff options
author | beck <> | 2024-03-24 11:30:12 +0000 |
---|---|---|
committer | beck <> | 2024-03-24 11:30:12 +0000 |
commit | 5176ab31ca58949fc78b5b06b23adf63a83b9c44 (patch) | |
tree | af867a635253990b4a88720849f04a8a6bb5d8b3 /src/usr.sbin | |
parent | c84d6a97971ee756cdbcf3936caaeaa66a6d2289 (diff) | |
download | openbsd-5176ab31ca58949fc78b5b06b23adf63a83b9c44.tar.gz openbsd-5176ab31ca58949fc78b5b06b23adf63a83b9c44.tar.bz2 openbsd-5176ab31ca58949fc78b5b06b23adf63a83b9c44.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.c | 5 |
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 | } |