boringssl/crypto/x509
Matthew Braithwaite e2c083dfd6 ASN1_UTCTIME_print: fix, comment, test.
The motiviation is that M2Crypto passes an ASN1_GENERALIZEDTIME to
this function.  This is not distinct from ASN1_UTCTIME (both are
asn1_string_st), but ASN1_GENERALIZEDTIME uses a 4-digit year in its
string representation, whereas ASN1_UTCTIME uses a 2-digit year.

ASN1_UTCTIME_print previously did not return an error on such inputs.
So, stricten (?) the function, ensuring that it checks for trailing
data, and rejects values that are invalid for their place.  Along the
way, clean it up and add tests.

Change-Id: Ia8298bed573f2acfdab96638ea69c78b5bba4e4b
Reviewed-on: https://boringssl-review.googlesource.com/13082
Reviewed-by: Adam Langley <alangley@gmail.com>
Commit-Queue: Adam Langley <alangley@gmail.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2017-01-10 23:32:12 +00:00
..
a_digest.c
a_sign.c
a_strex.c
a_verify.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
algorithm.c
asn1_gen.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
by_dir.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
by_file.c
charmap.h
CMakeLists.txt
i2d_pr.c
internal.h
pkcs7_test.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
pkcs7.c
rsa_pss.c
t_crl.c
t_req.c
t_x509.c ASN1_UTCTIME_print: fix, comment, test. 2017-01-10 23:32:12 +00:00
t_x509a.c
vpm_int.h
x509_att.c
x509_cmp.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x509_d2.c
x509_def.c
x509_ext.c
x509_lu.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x509_obj.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x509_r2x.c
x509_req.c
x509_set.c
x509_test.cc ASN1_UTCTIME_print: fix, comment, test. 2017-01-10 23:32:12 +00:00
x509_trs.c
x509_txt.c
x509_v3.c
x509_vfy.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x509_vpm.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x509.c
x509cset.c
x509name.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x509rset.c
x509spki.c
x509type.c
x_algor.c
x_all.c
x_attrib.c
x_crl.c Correctly find all critical CRL extensions. 2016-10-24 20:09:28 +00:00
x_exten.c
x_info.c
x_name.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x_pkey.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x_pubkey.c
x_req.c
x_sig.c
x_spki.c
x_val.c
x_x509.c Fix X509_parse_from_buffer when failing to parse. 2016-12-08 16:20:49 +00:00
x_x509a.c