mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 17:38:00 +00:00
openssh-certs: Avoid C99 strftime() specifiers.
These were introduced in 34d01e1b65
to pretty-print certificate validity
ranges. But Microsoft's C runtime took a while to catch up with C99 --
stackoverflow claims that VS2013 and earlier don't support these
specifiers -- so it's possible to end up with PuTTY executables that
misdisplay these dates. Also, the mingw-w64 toolchain's -Wformat
complains about these specifiers, at least on Debian buster, presumably
for the same reason.
Since the specifiers in question have exact pre-C99 replacements, it
seems easiest just to use those.
This commit is contained in:
parent
baea34a5b2
commit
d2e982efa7
@ -581,7 +581,7 @@ static void opensshcert_time_to_iso8601(BinarySink *bs, uint64_t time)
|
||||
time_t t = time;
|
||||
char buf[256];
|
||||
put_data(bs, buf, strftime(buf, sizeof(buf),
|
||||
"%a %F %T %Z", localtime(&t)));
|
||||
"%a %Y-%m-%d %H:%M:%S %Z", localtime(&t)));
|
||||
}
|
||||
|
||||
static void opensshcert_string_list_key_components(
|
||||
|
Loading…
Reference in New Issue
Block a user