]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-ssl-iostream: Replace unreachable error handling with i_unreached().
authorsergey.kitov <sergey.kitov@open-xchange.com>
Mon, 3 Jan 2022 15:03:32 +0000 (17:03 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Wed, 19 Jan 2022 11:06:38 +0000 (11:06 +0000)
SSL_CTX_set_eddh_auto() cannot return 0 when HAVE_ECDH is defined.

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

index fe9b05956e1307017853ec807f053f3a71790828..536889ebc53e2d780270d8d33392edc160063d72 100644 (file)
@@ -573,9 +573,7 @@ ssl_proxy_ctx_set_crypto_params(SSL_CTX *ssl_ctx,
           bool in OpenSSL 1.1 and is int in OpenSSL 1.0.2+ */
        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());
-               return -1;
+               i_unreached();
        }
 #else
        /* For OpenSSL < 1.0.2, ECDH temporary key parameter selection must be