On Mon, Feb 17, 2020 at 8:52 AM <gbec...@apache.org> wrote:
>
> Author: gbechis
> Date: Mon Feb 17 07:52:55 2020
> New Revision: 1874101
>
> URL: http://svn.apache.org/viewvc?rev=1874101&view=rev
> Log:
> fix build with LibreSSL 2.0.7+
> bz 64047
>
> --- httpd/httpd/trunk/modules/ssl/ssl_private.h (original)
> +++ httpd/httpd/trunk/modules/ssl/ssl_private.h Mon Feb 17 07:52:55 2020
> @@ -228,9 +228,11 @@
>  #define BN_get_rfc3526_prime_4096  get_rfc3526_prime_4096
>  #define BN_get_rfc3526_prime_6144  get_rfc3526_prime_6144
>  #define BN_get_rfc3526_prime_8192  get_rfc3526_prime_8192
> +#if !defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 
> 0x2070000fL
>  #define BIO_set_init(x,v)          (x->init=v)
>  #define BIO_get_data(x)            (x->ptr)
>  #define BIO_set_data(x,v)          (x->ptr=v)
> +#endif
>  #define BIO_get_shutdown(x)        (x->shutdown)
>  #define BIO_set_shutdown(x,v)      (x->shutdown=v)
>  #define DH_bits(x)                 (BN_num_bits(x->p))

This block is enclosed by an:
  #if MODSSL_USE_OPENSSL_PRE_1_1_API
so I wonder if this change is still needed after
  
https://github.com/apache/httpd/pull/381/commits/5d154a4823c3a3593629328f90a64da908c04114#diff-71e13cebcaceeab74eaf5cfd988de6099fcfe10a59001af590a922e8d4532748L145-R165
from r1908537 (i.e. after your changes).

The issue was (I think) that MODSSL_USE_OPENSSL_PRE_1_1_API was
incorrectly defined as (for LibreSSL):
  #define MODSSL_USE_OPENSSL_PRE_1_1_API (LIBRESSL_VERSION_NUMBER < 0x2070000f)
and the preprocessor can't evaluate this in an #if (my bad for having
spread this kind of #defines in httpd and apr, which I now need to
fix..).

Since r1908537 it's now:
  #if LIBRESSL_VERSION_NUMBER < 0x2070000f
  #define MODSSL_USE_OPENSSL_PRE_1_1_API 1
  #else
  #define MODSSL_USE_OPENSSL_PRE_1_1_API 0
  #endif
so the above hunk is probably not needed anymore (though harmless).


Regards;
Yann.

Reply via email to