Fix typo in CONTRIBUTING.md
[openssl.git] / ssl / ssl_txt.c
index bd925539554e7b73b904e2365aa7b8dae30c699f..9e9c2e10ec8df257aea5153bbaa18c7f12d0114e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2022 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
@@ -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)
@@ -151,7 +153,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;
     }