]> 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:09:13 +0000 (10:09 +0200)
commit43863a609e4ebf3b3e76e6356e2777949f67f8cc
tree30a63eb2792f5080b6b6eaee925454be892ea3a9
parente239e229c8ff9c7deb2002d1c923671970703793
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)

(cherry picked from commit 83951a9979784ffa701e945b86f2f0bc2caead8e)
test/crltest.c