Fix freshly introduced double-free.
authorViktor Dukhovni <openssl-users@dukhovni.org>
Sat, 25 Nov 2023 18:26:20 +0000 (13:26 -0500)
committerTomas Mraz <tomas@openssl.org>
Wed, 29 Nov 2023 09:31:42 +0000 (10:31 +0100)
commitf636e7e6bd8e06c6d84e42729b4131b4f5df488f
tree376f2e876b9310c8a33a75ac1d955683cea45dc7
parent870f26e66ad6c52af6ec6100fb9f5d5ce67c6586
Fix freshly introduced double-free.

We don't need the decoded X.509 Full(0) certificate for the EE usages 1 and 3,
because the leaf certificate is always part of the presented chain, so the
certificate is only validated as well-formed, and then discarded, but the
TLSA record is of course still used after the validation step.

Added DANE test cases for: 3 0 0, 3 1 0, 1 0 0, and 1 1 0

Reported by Claus Assmann.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22821)
ssl/ssl_lib.c
test/danetest.in