From: David Carlier Date: Wed, 16 Mar 2022 23:21:58 +0000 (+0000) Subject: print SSL session, fix build warnings on OpenBSD. X-Git-Tag: OpenSSL_1_1_1o~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d9f48d079cbbe85c684c2215955c2a70b2d1c6b;p=thirdparty%2Fopenssl.git print SSL session, fix build warnings on OpenBSD. time_t is a 64 bits type on this platform. Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/17917) (cherry picked from commit 9362638b080e328ccab43f89048bed27bcf2f11d) --- diff --git a/ssl/ssl_txt.c b/ssl/ssl_txt.c index 457bc8b3c20..eb5d01e3a38 100644 --- a/ssl/ssl_txt.c +++ b/ssl/ssl_txt.c @@ -130,11 +130,11 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x) } #endif if (x->time != 0L) { - if (BIO_printf(bp, "\n Start Time: %ld", x->time) <= 0) + if (BIO_printf(bp, "\n Start Time: %lld", (long long)x->time) <= 0) goto err; } if (x->timeout != 0L) { - if (BIO_printf(bp, "\n Timeout : %ld (sec)", x->timeout) <= 0) + if (BIO_printf(bp, "\n Timeout : %lld (sec)", (long long)x->timeout) <= 0) goto err; } if (BIO_puts(bp, "\n") <= 0)