openssl: Fix potential crash with ECDH on Windows
authorTobias Brunner <tobias@strongswan.org>
Tue, 26 Jan 2021 18:33:24 +0000 (19:33 +0100)
committerTobias Brunner <tobias@strongswan.org>
Wed, 27 Jan 2021 15:37:45 +0000 (16:37 +0100)
commit6c26267b07f77f8a14af7091af01b8dd0bb56b1c
tree7188c619baca247717415929b1d6897e7ad3f119
parent55df5e979718a80015e858ca32bc2c92d08b39cf
openssl: Fix potential crash with ECDH on Windows

Apparently, we should use OPENSSL_free() to release memory allocated by
OpenSSL.  While it generally maps to free() that's apparently not the
case on Windows, where the ECP test vectors caused `ACCESS_VIOLATION
exception` crashes (not always the same vector).

Fixes: 74e02ff5e624 ("openssl: Mainly use EVP interface for ECDH")
src/libstrongswan/plugins/openssl/openssl_ec_diffie_hellman.c