boringssl/crypto/bio
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
..
bio_mem.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
bio_test.cc Add missing errno.h include to bio_test.cc 2017-12-04 01:32:37 +00:00
bio.c Always push errors on BIO_read_asn1 failure. 2018-10-11 19:53:15 +00:00
connect.c Remove files from Trusty which can't link because of Trusty libc. 2018-04-19 19:06:58 +00:00
fd.c Remove files from Trusty which can't link because of Trusty libc. 2018-04-19 19:06:58 +00:00
file.c Replace BIO_new + BIO_set_fp with BIO_new_fp. 2018-09-26 17:21:08 +00:00
hexdump.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
internal.h Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
pair.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
printf.c Remove now unnecessary _POSIX_C_SOURCE bits to work around macOS bug. 2017-10-02 20:02:22 +00:00
socket_helper.c Remove files from Trusty which can't link because of Trusty libc. 2018-04-19 19:06:58 +00:00
socket.c Remove files from Trusty which can't link because of Trusty libc. 2018-04-19 19:06:58 +00:00