httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: SSL_CTX_set_ecdh_auto noop OpenSSL 1.1.0?
Date Thu, 16 Feb 2017 22:39:00 GMT
On Thu, Feb 16, 2017 at 11:33 PM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
> On Thu, Feb 16, 2017 at 10:52 PM, William A Rowe Jr <wrowe@rowe-clan.net> wrote:
>> I'm not clear that this was a good usage of the current API...
>>
>> In file included from httpd-2.x/modules/ssl/ssl_private.h:90:0,
>>                  from httpd-2.x/modules/ssl/ssl_engine_init.c:29:
>> httpd-2.x/modules/ssl/ssl_engine_init.c: In function ‘ssl_init_server_certs’:
>> include/openssl/ssl.h:1287:51: warning: statement with no effect
>> [-Wunused-value]
>>  # define SSL_CTX_set_ecdh_auto(dummy, onoff)      ((onoff) != 0)
>>                                                    ^
>> httpd-2.x/modules/ssl/ssl_engine_init.c:1328:9: note: in expansion of
>> macro ‘SSL_CTX_set_ecdh_auto’
>>          SSL_CTX_set_ecdh_auto(mctx->ssl_ctx, 1);
>>          ^~~~~~~~~~~~~~~~~~~~~
>
> Looks like OpenSSL missed a cast to void in its macro implementation.
> I think goal was to still evaluate "onoff", but in this case
> "((void)((onoff) != 0))" or the usual "do (void)((onoff) != 0); while
> (0)" would have been more clean/compatible...

Wait, SSL_CTX_set_ecdh_auto() used to return an int so the macro is
right actually.
Hmm, picky compiler :)

>
> I guess we'll have to work around this with our own (void) casting.

That still holds...

Mime
View raw message