summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2016-02-24 14:37:53 +0000
committerDavid Howells <dhowells@redhat.com>2016-02-29 14:29:40 +0000
commitede5147d515694e012cd958ec874b9daf8a65fec (patch)
treec36bce6fc0df37045ed352819d583b147f73b60a /crypto
parentac4cbedfdf55455b4c447f17f0fa027dbf02b2a6 (diff)
downloadlinux-ede5147d515694e012cd958ec874b9daf8a65fec.tar.gz
linux-ede5147d515694e012cd958ec874b9daf8a65fec.tar.bz2
linux-ede5147d515694e012cd958ec874b9daf8a65fec.zip
Handle ISO 8601 leap seconds and encodings of midnight in mktime64()
Handle the following ISO 8601 features in mktime64(): (1) Leap seconds. Leap seconds are indicated by the seconds parameter being the value 60. Handle this by treating it the same as 00 of the following minute. It has been pointed out that a minute may contain two leap seconds. However, pending discussion of what that looks like and how to handle it, I'm not going to concern myself with it. (2) Alternate encodings of midnight. Two different encodings of midnight are permitted - 00:00:00 and 24:00:00 - the first is midnight today and the second is midnight tomorrow and is exactly equivalent to the first with tomorrow's date. As it happens, we don't actually need to change mktime64() to handle either of these - just comment them as valid parameters. These facility will be used by the X.509 parser. Doing it in mktime64() makes the policy common to the whole kernel and easier to find. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> cc: John Stultz <john.stultz@linaro.org> cc: Rudolf Polzer <rpolzer@google.com> cc: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions