PKCS#7: Improve and export the X.509 ASN.1 time object decoder
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>
Showing
- crypto/asymmetric_keys/x509_cert_parser.c 66 additions, 21 deletionscrypto/asymmetric_keys/x509_cert_parser.c
- crypto/asymmetric_keys/x509_parser.h 5 additions, 2 deletionscrypto/asymmetric_keys/x509_parser.h
- crypto/asymmetric_keys/x509_public_key.c 1 addition, 8 deletionscrypto/asymmetric_keys/x509_public_key.c
Please register or sign in to comment