diff options
Diffstat (limited to 'ssl/ssl_txt.c')
-rw-r--r-- | ssl/ssl_txt.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ssl/ssl_txt.c b/ssl/ssl_txt.c index 212fe00962ea..d928cb9bbd6f 100644 --- a/ssl/ssl_txt.c +++ b/ssl/ssl_txt.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. * Copyright 2005 Nokia. All rights reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use @@ -12,6 +12,8 @@ #include <openssl/buffer.h> #include "ssl_local.h" +#include "internal/comp.h" + #ifndef OPENSSL_NO_STDIO int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *x) { @@ -128,12 +130,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) @@ -151,7 +155,7 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x) if (istls13) { if (BIO_printf(bp, " Max Early Data: %u\n", - x->ext.max_early_data) <= 0) + (unsigned int)x->ext.max_early_data) <= 0) goto err; } |