openssl: Ensure underlying hash algorithm is available during HMAC init
authorTobias Brunner <tobias@strongswan.org>
Tue, 3 Dec 2019 15:11:39 +0000 (16:11 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 6 Dec 2019 09:27:24 +0000 (10:27 +0100)
commit6b347d5232c7a8f5637e752ae36591d39aad0cee
treed7757b001b96ff47995480c187ec79022d5ade08
parent96b8fa72b39bb6c416ddf99e3887270e5b0c27e9
openssl: Ensure underlying hash algorithm is available during HMAC init

Without this we only would learn that the algorithm isn't actually
available (e.g. due to FIPS mode) when set_key() is called later, so there
isn't any automatic fallback to other implementations.

Fixes #3284.
src/libstrongswan/plugins/openssl/openssl_hmac.c