crl2pkcs7 shouldn't include empty optional sets
authorDave Coombs <dcoombs@carillon.ca>
Tue, 6 Apr 2021 16:49:21 +0000 (12:49 -0400)
committerTomas Mraz <tomas@openssl.org>
Fri, 9 Apr 2021 09:26:54 +0000 (11:26 +0200)
commitf82f5392f39797c1cf3a5d114c0125f121b0f769
treeff52ecec6d9e640b5f94c90220fbd2b27e9bc7f7
parentee97c0e3da1222b12afd4c50b43369b4b7014026
crl2pkcs7 shouldn't include empty optional sets

If using crl2pkcs7 -nocrl and with no -certfiles, we shouldn't include
the implicitly tagged [0] certs and [1] crls sets as they are marked
optional and would be empty.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14781)

(cherry picked from commit d3a5898a7f4980bc0fa6345c408f88007573c405)
apps/crl2p7.c