]> git.ipfire.org Git - thirdparty/openssl.git/commit
Extend test case for reused PEM_ASN1_read_bio
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 24 Nov 2023 06:02:35 +0000 (07:02 +0100)
committerTomas Mraz <tomas@openssl.org>
Fri, 16 Aug 2024 08:07:52 +0000 (10:07 +0200)
commit83951a9979784ffa701e945b86f2f0bc2caead8e
tree45448d4644faf528a5b2485aede90908b2a0067a
parentdcc118cde0fb9c90b973f9eb90006cec5bbeaa35
Extend test case for reused PEM_ASN1_read_bio

This is related to #22780, simply add test cases
for the different failure modes of PEM_ASN1_read_bio.
Depending on whether the PEM or the DER format is valid or not,
the passed in CRL may be deleted ot not, therefore a statement
like this:

reused_crl = PEM_read_bio_X509_CRL(b, &reused_crl, NULL, NULL);

must be avoided, because it can create memory leaks.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22809)
test/crltest.c