kernel-fxtec-pro1x/crypto/asymmetric_keys
David Howells da02559c9f X.509: Support leap seconds
The format of ASN.1 GeneralizedTime seems to be specified by ISO 8601
[X.680 46.3] and this apparently supports leap seconds (ie. the seconds
field is 60).  It's not entirely clear that ASN.1 expects it, but we can
relax the seconds check slightly for GeneralizedTime.

This results in us passing a time with sec as 60 to mktime64(), which
handles it as being a duplicate of the 0th second of the next minute.

We can't really do otherwise without giving the kernel much greater
knowledge of where all the leap seconds are.  Unfortunately, this would
require change the mapping of the kernel's current-time-in-seconds.

UTCTime, however, only supports a seconds value in the range 00-59, but for
the sake of simplicity allow this with UTCTime also.

Without this patch, certain X.509 certificates will be rejected,
potentially making a kernel unbootable.

Reported-by: Rudolf Polzer <rpolzer@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
cc: David Woodhouse <David.Woodhouse@intel.com>
cc: John Stultz <john.stultz@linaro.org>
2016-02-29 14:29:40 +00:00
..
.gitignore X.509: Add a crypto key parser for binary (DER) X.509 certificates 2012-10-08 13:50:22 +10:30
asymmetric_keys.h KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
asymmetric_type.c KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
Kconfig crypto: KEYS: convert public key and digsig asym to the akcipher api 2016-02-10 10:13:27 +00:00
Makefile crypto: KEYS: convert public key and digsig asym to the akcipher api 2016-02-10 10:13:27 +00:00
mscode.asn1 pefile: Parse the "Microsoft individual code signing" data blob 2014-07-09 14:58:37 +01:00
mscode_parser.c PKCS#7: Add OIDs for sha224, sha284 and sha512 hash algos and use them 2015-09-01 09:59:20 +10:00
pkcs7.asn1 PKCS#7: Appropriately restrict authenticated attributes and content type 2015-08-12 17:01:01 +01:00
pkcs7_key_type.c PKCS#7: Add MODULE_LICENSE() to test module 2015-08-13 02:51:33 +01:00
pkcs7_parser.c PKCS#7: fix unitialized boolean 'want' 2016-02-29 14:29:03 +00:00
pkcs7_parser.h PKCS#7: Appropriately restrict authenticated attributes and content type 2015-08-12 17:01:01 +01:00
pkcs7_trust.c crypto: KEYS: convert public key and digsig asym to the akcipher api 2016-02-10 10:13:27 +00:00
pkcs7_verify.c crypto: KEYS: convert public key and digsig asym to the akcipher api 2016-02-10 10:13:27 +00:00
public_key.c crypto: KEYS: convert public key and digsig asym to the akcipher api 2016-02-10 10:13:27 +00:00
rsa.c crypto: KEYS: convert public key and digsig asym to the akcipher api 2016-02-10 10:13:27 +00:00
signature.c crypto: asymmetric_keys - signature.c does not need <module.h> 2015-12-11 22:55:19 +08:00
verify_pefile.c PKCS#7: Appropriately restrict authenticated attributes and content type 2015-08-12 17:01:01 +01:00
verify_pefile.h pefile: Parse the "Microsoft individual code signing" data blob 2014-07-09 14:58:37 +01:00
x509.asn1 X.509: Add bits needed for PKCS#7 2014-07-01 16:40:19 +01:00
x509_akid.asn1 X.509: Extract both parts of the AuthorityKeyIdentifier 2015-08-07 16:26:13 +01:00
x509_cert_parser.c X.509: Support leap seconds 2016-02-29 14:29:40 +00:00
x509_parser.h KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
x509_public_key.c crypto: KEYS: convert public key and digsig asym to the akcipher api 2016-02-10 10:13:27 +00:00