]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PKCS#7: Improve and export the X.509 ASN.1 time object decoder
authorDavid Howells <dhowells@redhat.com>
Wed, 29 Jul 2015 15:58:32 +0000 (16:58 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:46:11 +0000 (15:46 -0700)
commitba548675f4829cc5fe293aa0fe4f29c016ba13b3
tree87428d79ed640fbc71f07c47bb8f53b3d4a0c902
parentc713095526ce0d1a7386beeed7908971109636ac
PKCS#7: Improve and export the X.509 ASN.1 time object decoder

Orabug: 23331074

[ Upstream commit fd19a3d195be23e8d9d0d66576b96ea25eea8323 ]

Make the X.509 ASN.1 time object decoder fill in a time64_t rather than a
struct tm to make comparison easier (unfortunately, this makes readable
display less easy) and export it so that it can be used by the PKCS#7 code
too.

Further, tighten up its parsing to reject invalid dates (eg. weird
characters, non-existent hour numbers) and unsupported dates (eg. timezones
other than 'Z' or dates earlier than 1970).

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit f85d91f88486b34679c532a5687466eaf335258f)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
crypto/asymmetric_keys/x509_cert_parser.c
crypto/asymmetric_keys/x509_parser.h
crypto/asymmetric_keys/x509_public_key.c