]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-ssl-iostream: Fix boolean misuse in SSL_CTX_set_ecdh_auto usage
authorAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 17 Apr 2018 09:20:26 +0000 (12:20 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Wed, 13 Jun 2018 05:38:25 +0000 (08:38 +0300)
f8aaa6e63a56085f61f128838ad7a3aa080d9d5b introduced warnings on gcc

src/lib-ssl-iostream/iostream-openssl-context.c

index 6dbbe9676073f50f21a78ba5096b58725383fd4a..e3c902e18da4c1e5f38e7ccd2210590d8772b587 100644 (file)
@@ -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());