Use |BIO_read_asn1| when parsing PKCS#7.

Previously the code read the whole of the BIO and parsed any PKCS#7
blobs that were found. However, X509CertificateTest specifically tests
that trailing data is retained when parsing PKCS#7 so this change makes
it so.

This depends on https://android-review.googlesource.com/#/c/151205/.

Bug: 21396526
Bug: 21209493
Change-Id: I4e07cebf599f52aedbea9b0a3f66d9a052c86aaa
1 file changed