Bad ASN.1 data should never be able to trigger a malloc failure so return
an error in d2i_test if a malloc failure occurs.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Using ASN1_ITEM tables in d2i_test: this then uses consistent names and
makes it easier to extend.
Add bio, reencode and compare tests.
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
These leaks affect 1.1.0 dev branch only; introduced around commit
f93ad22f6adb00e722c130e792799467f3927b56
Found with LibFuzzer
Reviewed-by: Ben Laurie <ben@openssl.org>