diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-04-17 11:23:45 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-04-17 11:23:45 +0200 |
commit | d4b32f840f23f5423856b93b567ea2fb1439896d (patch) | |
tree | 137c342b4a9438fe28c267e4b8ce149f8463a7a9 | |
parent | 920e42670c49bdd166f26967f1e2198a99e072df (diff) | |
download | gnutls-d4b32f840f23f5423856b93b567ea2fb1439896d.tar.gz |
Don't use %e specifier with strftime, it doesn't work under Windows.
Reported by Massimo Gaspari <massimo.gaspari@alice.it> in
<http://permalink.gmane.org/gmane.network.gnutls.general/1170>.
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | lib/x509/output.c | 10 |
2 files changed, 9 insertions, 5 deletions
@@ -14,6 +14,10 @@ Based on report from "John Brooks" <aspecialj@gmail.com> in Based on HPUX build hints in <http://hpux.cs.utah.edu/hppd/cgi-bin/wwwtar?/hpux/Gnu/gnutls-2.3.4/gnutls-2.3.4-src-11.11.tar.gz+gnutls-2.3.4/HPUX.Install+text>. +** Don't use %e specifier with strftime, it doesn't work under Windows. +Reported by Massimo Gaspari <massimo.gaspari@alice.it> in +<http://permalink.gmane.org/gmane.network.gnutls.general/1170>. + ** API and ABI modifications: No changes since last version. diff --git a/lib/x509/output.c b/lib/x509/output.c index 42e709f947..27a0fdae9e 100644 --- a/lib/x509/output.c +++ b/lib/x509/output.c @@ -560,7 +560,7 @@ print_cert (gnutls_string * str, gnutls_x509_crt_t cert, int notsigned) if (gmtime_r (&tim, &t) == NULL) addf (str, "error: gmtime_r (%d)\n", t); - else if (strftime (s, max, "%a %b %e %H:%M:%S UTC %Y", &t) == 0) + else if (strftime (s, max, "%a %b %d %H:%M:%S UTC %Y", &t) == 0) addf (str, "error: strftime (%d)\n", t); else addf (str, _("\t\tNot Before: %s\n"), s); @@ -574,7 +574,7 @@ print_cert (gnutls_string * str, gnutls_x509_crt_t cert, int notsigned) if (gmtime_r (&tim, &t) == NULL) addf (str, "error: gmtime_r (%d)\n", t); - else if (strftime (s, max, "%a %b %e %H:%M:%S UTC %Y", &t) == 0) + else if (strftime (s, max, "%a %b %d %H:%M:%S UTC %Y", &t) == 0) addf (str, "error: strftime (%d)\n", t); else addf (str, _("\t\tNot After: %s\n"), s); @@ -1207,7 +1207,7 @@ print_crl (gnutls_string *str, if (gmtime_r (&tim, &t) == NULL) addf (str, "error: gmtime_r (%d)\n", t); - else if (strftime (s, max, "%a %b %e %H:%M:%S UTC %Y", &t) == 0) + else if (strftime (s, max, "%a %b %d %H:%M:%S UTC %Y", &t) == 0) addf (str, "error: strftime (%d)\n", t); else addf (str, _("\t\tIssued: %s\n"), s); @@ -1223,7 +1223,7 @@ print_crl (gnutls_string *str, addf (str, "\t\tNo next update time.\n"); else if (gmtime_r (&tim, &t) == NULL) addf (str, "error: gmtime_r (%d)\n", t); - else if (strftime (s, max, "%a %b %e %H:%M:%S UTC %Y", &t) == 0) + else if (strftime (s, max, "%a %b %d %H:%M:%S UTC %Y", &t) == 0) addf (str, "error: strftime (%d)\n", t); else addf (str, _("\t\tNext at: %s\n"), s); @@ -1263,7 +1263,7 @@ print_crl (gnutls_string *str, if (gmtime_r (&tim, &t) == NULL) addf (str, "error: gmtime_r (%d)\n", t); - else if (strftime (s, max, "%a %b %e %H:%M:%S UTC %Y", &t) == 0) + else if (strftime (s, max, "%a %b %d %H:%M:%S UTC %Y", &t) == 0) addf (str, "error: strftime (%d)\n", t); else addf (str, _("\t\tRevoked at: %s\n"), s); |