summaryrefslogtreecommitdiffstats
path: root/web/attachments/396772-sslutils_proper_date.patch
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/396772-sslutils_proper_date.patch')
-rw-r--r--web/attachments/396772-sslutils_proper_date.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/web/attachments/396772-sslutils_proper_date.patch b/web/attachments/396772-sslutils_proper_date.patch
new file mode 100644
index 0000000..6e0ebe0
--- /dev/null
+++ b/web/attachments/396772-sslutils_proper_date.patch
@@ -0,0 +1,27 @@
1--- sslutils.c 2010-12-23 09:23:37.000000000 +1100
2+++ sslutils.c.orig 2009-05-22 07:11:51.000000000 +1000
3@@ -102,8 +102,7 @@
4 struct tm stamp;
5 float time_left;
6 int days_left;
7-// char timestamp[17] = "";
8- char *timestamp;
9+ char timestamp[17] = "";
10
11 certificate=SSL_get_peer_certificate(s);
12 if(! certificate){
13@@ -150,13 +149,10 @@
14
15 time_left = difftime(timegm(&stamp), time(NULL));
16 days_left = time_left / 86400;
17-/*
18 snprintf
19 (timestamp, 17, "%02d/%02d/%04d %02d:%02d",
20 stamp.tm_mon + 1,
21 stamp.tm_mday, stamp.tm_year + 1900, stamp.tm_hour, stamp.tm_min);
22-*/
23- timestamp = asctime(&stamp);
24
25 if (days_left > 0 && days_left <= days_till_exp) {
26 printf (_("WARNING - Certificate expires in %d day(s) (%s).\n"), days_left, timestamp);
27