boringssl/crypto/x509
David Benjamin 80aa694975 Always push errors on BIO_read_asn1 failure.
This is consistent with the old behavior of d2i_*_fp and avoids tripping
Conscrypt's unnecessarily fragile error-handling (see
https://github.com/google/conscrypt/pull/552).

Additionally, by source inspection, CPython expects
ASN1_R_HEADER_TOO_LONG on EOF, analogously to PEM_R_NO_START_LINE. Fix
that. The other errors are a bit haphazard in the old implementation
(that code is really hard to follow), so I didn't match it too
carefully. In particular, OpenSSL would report ASN1_R_HEADER_TOO_LONG on
some generic tag parsing, but that is inconsistent with
ASN1_R_HEADER_TOO_LONG being an EOF signal.

Update-Note: https://boringssl-review.googlesource.com/32106 may have
caused some compatibility issues. This should fix it.

Change-Id: Idfe2746ffd7733de4338e14c58a40753e98a791e
Reviewed-on: https://boringssl-review.googlesource.com/c/32444
Reviewed-by: Steven Valdez <svaldez@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2018-10-11 19:53:15 +00:00
..
a_digest.c
a_sign.c
a_strex.c Use new encoding functions in ASN1_mbstring_ncopy. 2018-05-11 21:58:47 +00:00
a_verify.c
algorithm.c
asn1_gen.c
by_dir.c
by_file.c Fix ERR_GET_REASON checks. 2018-09-26 19:02:42 +00:00
charmap.h
i2d_pr.c
internal.h
make_many_constraints.go
many_constraints.pem
many_names1.pem
many_names2.pem
many_names3.pem
rsa_pss.c
some_names1.pem
some_names2.pem
some_names3.pem
t_crl.c Replace BIO_new + BIO_set_fp with BIO_new_fp. 2018-09-26 17:21:08 +00:00
t_req.c Replace BIO_new + BIO_set_fp with BIO_new_fp. 2018-09-26 17:21:08 +00:00
t_x509.c Replace BIO_new + BIO_set_fp with BIO_new_fp. 2018-09-26 17:21:08 +00:00
t_x509a.c
vpm_int.h
x509_att.c
x509_cmp.c Add PKCS12_create. 2018-05-11 21:59:34 +00:00
x509_d2.c
x509_def.c
x509_ext.c
x509_lu.c Add a bunch of X509_STORE getters and setters. 2018-05-11 21:59:58 +00:00
x509_obj.c
x509_r2x.c
x509_req.c
x509_set.c
x509_test.cc Always push errors on BIO_read_asn1 failure. 2018-10-11 19:53:15 +00:00
x509_time_test.cc Make X509 time validation stricter. 2018-06-25 17:54:33 +00:00
x509_trs.c
x509_txt.c
x509_v3.c
x509_vfy.c Don't accept “SSL client” as a substitute for S/MIME in the Netscape cert type extension. 2018-08-06 21:52:28 +00:00
x509_vpm.c
x509.c
x509cset.c Add a pile of compatibility functions. 2018-08-13 23:13:26 +00:00
x509name.c
x509rset.c
x509spki.c
x_algor.c
x_all.c Fix undefined function pointer casts in {d2i,i2d}_Foo_{bio,fp} 2018-10-01 17:34:53 +00:00
x_attrib.c
x_crl.c
x_exten.c
x_info.c
x_name.c
x_pkey.c
x_pubkey.c
x_req.c
x_sig.c
x_spki.c
x_val.c
x_x509.c
x_x509a.c