aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/tls.c
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2022-05-30 13:43:05 +0200
committerGitHub <noreply@github.com>2022-05-30 13:43:05 +0200
commit3b825fca6dc9faef47a06fc47e38450b7571e90a (patch)
tree60e892f301609a9a4c851968253df3a74a67c688 /src/lib/protocols/tls.c
parent897f8314b29cd7de9eeab9af15b3e189ae6724a1 (diff)
Certificate timestamps should be printed in UTC (#1563)
This way, the CI results are consistent
Diffstat (limited to 'src/lib/protocols/tls.c')
-rw-r--r--src/lib/protocols/tls.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/protocols/tls.c b/src/lib/protocols/tls.c
index 24ed7b20e..26d906798 100644
--- a/src/lib/protocols/tls.c
+++ b/src/lib/protocols/tls.c
@@ -483,10 +483,10 @@ static void processCertificateElements(struct ndpi_detection_module_struct *ndpi
time_t theTime;
theTime = flow->protos.tls_quic.notBefore;
- strftime(b, sizeof(b), "%d/%b/%Y %H:%M:%S", localtime_r(&theTime, &result));
+ strftime(b, sizeof(b), "%d/%b/%Y %H:%M:%S", gmtime_r(&theTime, &result));
theTime = flow->protos.tls_quic.notAfter;
- strftime(e, sizeof(e), "%d/%b/%Y %H:%M:%S", localtime_r(&theTime, &result));
+ strftime(e, sizeof(e), "%d/%b/%Y %H:%M:%S", gmtime_r(&theTime, &result));
snprintf(str, sizeof(str), "%s - %s", b, e);
ndpi_set_risk(ndpi_struct, flow, NDPI_TLS_CERTIFICATE_EXPIRED, str); /* Certificate expired */
@@ -497,10 +497,10 @@ static void processCertificateElements(struct ndpi_detection_module_struct *ndpi
time_t theTime;
theTime = flow->protos.tls_quic.notBefore;
- strftime(b, sizeof(b), "%d/%b/%Y %H:%M:%S", localtime_r(&theTime, &result));
+ strftime(b, sizeof(b), "%d/%b/%Y %H:%M:%S", gmtime_r(&theTime, &result));
theTime = flow->protos.tls_quic.notAfter;
- strftime(e, sizeof(e), "%d/%b/%Y %H:%M:%S", localtime_r(&theTime, &result));
+ strftime(e, sizeof(e), "%d/%b/%Y %H:%M:%S", gmtime_r(&theTime, &result));
snprintf(str, sizeof(str), "%s - %s", b, e);
ndpi_set_risk(ndpi_struct, flow, NDPI_TLS_CERTIFICATE_ABOUT_TO_EXPIRE, str); /* Certificate almost expired */