summaryrefslogtreecommitdiff
path: root/ssl/ssl_txt.c
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2022-08-29 14:17:25 +1000
committerPauli <pauli@openssl.org>2022-09-13 21:13:22 +1000
commitf0131dc04a39afcb1629f5bec2814ef3a4925bbf (patch)
treeef87562f06970c15ee98084df86beaec0f49c729 /ssl/ssl_txt.c
parent364c3b7b1ac3172dbe2108be23ae215b86ef8e08 (diff)
downloadopenssl-new-f0131dc04a39afcb1629f5bec2814ef3a4925bbf.tar.gz
ssl: modify libssl so that it uses OSSL_TIME
This is instead of time_t and struct timeval. Some public APIs mandate a presence of these two types, but they are converted to OSSL_TIME internally. Reviewed-by: Todd Short <todd.short@me.com> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19082)
Diffstat (limited to 'ssl/ssl_txt.c')
-rw-r--r--ssl/ssl_txt.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ssl/ssl_txt.c b/ssl/ssl_txt.c
index 212fe00962..68f15d6182 100644
--- a/ssl/ssl_txt.c
+++ b/ssl/ssl_txt.c
@@ -128,12 +128,14 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x)
}
}
#endif
- if (x->time != 0L) {
- if (BIO_printf(bp, "\n Start Time: %lld", (long long)x->time) <= 0)
+ if (!ossl_time_is_zero(x->time)) {
+ if (BIO_printf(bp, "\n Start Time: %lld",
+ (long long)ossl_time_to_time_t(x->time)) <= 0)
goto err;
}
- if (x->timeout != 0L) {
- if (BIO_printf(bp, "\n Timeout : %lld (sec)", (long long)x->timeout) <= 0)
+ if (!ossl_time_is_zero(x->timeout)) {
+ if (BIO_printf(bp, "\n Timeout : %lld (sec)",
+ (long long)ossl_time2seconds(x->timeout)) <= 0)
goto err;
}
if (BIO_puts(bp, "\n") <= 0)