]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Print out the current ime correctly
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 7 Sep 2021 22:18:31 +0000 (17:18 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 7 Sep 2021 22:18:31 +0000 (17:18 -0500)
src/lib/tls/cert.c

index ddd1333dd4d7b23a9892117b8012726ff3626446..77f8be741f553adc60e4a608f98da0e7eaf89137 100644 (file)
@@ -73,7 +73,7 @@ int fr_tls_cert_is_valid(fr_unix_time_t *not_before_p, fr_unix_time_t *not_after
        if (fr_time_from_sec(not_after) < now) {
                fr_strerror_printf("Certificate has expired.  "
                                   "Validity period (notAfter) ends %pV, current time is %pV",
-                                  fr_box_date(fr_unix_time_from_time(not_before)), fr_box_date(now));
+                                  fr_box_date(fr_unix_time_from_time(not_before)), fr_box_date(fr_time_to_unix_time(now)));
                return -2;
        }
 
@@ -84,7 +84,7 @@ int fr_tls_cert_is_valid(fr_unix_time_t *not_before_p, fr_unix_time_t *not_after
        if (fr_time_from_sec(not_before) > now) {
                fr_strerror_printf("Certificate is not yet valid.  "
                                   "Validity period (notBefore) starts %pV, current time is %pV",
-                                  fr_box_date(fr_unix_time_from_time(not_before)), fr_box_date(now));
+                                  fr_box_date(fr_unix_time_from_time(not_before)), fr_box_date(fr_time_to_unix_time(now)));
                return -3;
        }