openssl: Reset HMAC key if chunk_empty is passed
authorTobias Brunner <tobias@strongswan.org>
Fri, 18 Dec 2020 13:17:37 +0000 (14:17 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 11 Feb 2021 15:40:58 +0000 (16:40 +0100)
commit6a440f83ab8332fd045fe30d60182e9f031ea73b
tree462ec68a1cc461221c497148eadaabe189669e08
parentcd10ae2ff050ab569bc6921239f630a365854a21
openssl: Reset HMAC key if chunk_empty is passed

If no valid key is configured (e.g. because it's inadvertently uninitialized),
we should not just reuse the previous key.

The `key_set` flag is not necessary anymore because a non-NULL key is set
during initialization since 6b347d5232c7 ("openssl: Ensure underlying hash
algorithm is available during HMAC init").
src/libstrongswan/plugins/openssl/openssl_hmac.c