OpenSSL: Fix OpenSSL 1.1.0 DH operation
authorJouni Malinen <j@w1.fi>
Fri, 15 Jul 2016 08:36:31 +0000 (11:36 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 15 Jul 2016 10:30:57 +0000 (13:30 +0300)
commit460e5cdf430372df3fff366ff7085cfd4afe8818
tree480727866ce05a2325fab53d21882db225786aae
parentec9812e7e79a91bdaebf5d8807b172a6703532d2
OpenSSL: Fix OpenSSL 1.1.0 DH operation

Commit 49fe2ada20d5fd53c0388442d23e7f03086f4d57 ('OpenSSL: Support
OpenSSL 1.1.0 DH opacity') started using the new accessor functions, but
used incorrect success check for the DH_set0_key() call. This resulted
in dh5_init_fixed() failures and double-free on error path if the build
was linked against OpenSSL 1.1.0. Fix this by checking DH_set0_key()
return value to be 1 for the success case.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/crypto/crypto_openssl.c