]> git.ipfire.org Git - thirdparty/strongswan.git/commit
libtls: Fix double-free for untrusted peer certificates
authorTobias Brunner <tobias@strongswan.org>
Fri, 17 Feb 2023 14:07:20 +0000 (15:07 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 17 Feb 2023 14:11:43 +0000 (15:11 +0100)
commit4d3fc90cafc1ee15e90f7af354ae2270fdce994e
tree42b346f7e815d3da74eaff0fff30b7d8fe440f61
parent0de42047a98f831e8963cc352265db6a78bccc1b
libtls: Fix double-free for untrusted peer certificates

`public` is returned, but previously only if a trusted key was found.
We obviously don't want to return untrusted keys and since the reference
was correctly destroyed after determining the key type, this later caused
a double-free.

Fixes: 63fd718915b5 ("libtls: call create_public_enumerator() with key_type")
src/libtls/tls_server.c