From: Aki Tuomi Date: Tue, 17 Apr 2018 09:20:26 +0000 (+0300) Subject: lib-ssl-iostream: Fix boolean misuse in SSL_CTX_set_ecdh_auto usage X-Git-Tag: 2.3.2.rc1~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=18fbc4a90148d13a16f98682989d1a19d9d3ad9d;p=thirdparty%2Fdovecot%2Fcore.git lib-ssl-iostream: Fix boolean misuse in SSL_CTX_set_ecdh_auto usage f8aaa6e63a56085f61f128838ad7a3aa080d9d5b introduced warnings on gcc --- diff --git a/src/lib-ssl-iostream/iostream-openssl-context.c b/src/lib-ssl-iostream/iostream-openssl-context.c index 6dbbe96760..e3c902e18d 100644 --- a/src/lib-ssl-iostream/iostream-openssl-context.c +++ b/src/lib-ssl-iostream/iostream-openssl-context.c @@ -526,7 +526,7 @@ ssl_proxy_ctx_set_crypto_params(SSL_CTX *ssl_ctx, /* OpenSSL >= 1.0.2 automatically handles ECDH temporary key parameter selection. The return value of this function changes is changed to bool in OpenSSL 1.1 and is int in OpenSSL 1.0.2+ */ - if (!(bool)SSL_CTX_set_ecdh_auto(ssl_ctx, 1)) { + if ((long)(SSL_CTX_set_ecdh_auto(ssl_ctx, 1)) == 0) { /* shouldn't happen */ *error_r = t_strdup_printf("SSL_CTX_set_ecdh_auto() failed: %s", openssl_iostream_error());