You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by gb...@apache.org on 2020/02/17 07:52:55 UTC
svn commit: r1874101 - in /httpd/httpd/trunk/modules/ssl: ssl_engine_init.c
ssl_private.h
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
Modified:
httpd/httpd/trunk/modules/ssl/ssl_engine_init.c
httpd/httpd/trunk/modules/ssl/ssl_private.h
Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_init.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_init.c?rev=1874101&r1=1874100&r2=1874101&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_init.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_init.c Mon Feb 17 07:52:55 2020
@@ -1624,7 +1624,7 @@ static apr_status_t ssl_init_proxy_certs
X509_STORE_CTX *sctx;
X509_STORE *store = SSL_CTX_get_cert_store(mctx->ssl_ctx);
-#if OPENSSL_VERSION_NUMBER >= 0x1010100fL
+#if OPENSSL_VERSION_NUMBER >= 0x1010100fL && !defined(LIBRESSL_VERSION_NUMBER)
/* For OpenSSL >=1.1.1, turn on client cert support which is
* otherwise turned off by default (by design).
* https://github.com/openssl/openssl/issues/6933 */
Modified: httpd/httpd/trunk/modules/ssl/ssl_private.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_private.h?rev=1874101&r1=1874100&r2=1874101&view=diff
==============================================================================
--- 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))
Re: svn commit: r1874101 - in /httpd/httpd/trunk/modules/ssl: ssl_engine_init.c ssl_private.h
Posted by Yann Ylavic <yl...@gmail.com>.
On Thu, Nov 16, 2023 at 2:13 PM Yann Ylavic <yl...@gmail.com> wrote:
>
> 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).
I went ahead and removed it in r1913838 (FWIW).
>
> Regards;
> Yann.
Re: svn commit: r1874101 - in /httpd/httpd/trunk/modules/ssl: ssl_engine_init.c ssl_private.h
Posted by Yann Ylavic <yl...@gmail.com>.
On Mon, Feb 17, 2020 at 8:52 AM <gb...@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.