Project

General

Profile

Actions

Bug #3277

closed

Compile error mod_openssl.c lighttpd-1.4.77 with openssl 3.0.15

Added by dani254 3 days ago. Updated 2 days ago.

Status:
Fixed
Priority:
Normal
Category:
TLS
Target version:
ASK QUESTIONS IN Forums:
No

Description

Hello
cross compiling for 32bit powerpc i got:

mod_openssl.c: In function 'mod_openssl_ssl_conf_curves':
mod_openssl.c:3028:41: error: missing ')' after "defined" 
    #elif (defined(BORINGSSL_API_VERSION && BORINGSSL_API_VERSION >= 3) \
                                         ^
mod_openssl.c:3028:44: error: missing binary operator before token "BORINGSSL_API_VERSION" 
    #elif (defined(BORINGSSL_API_VERSION && BORINGSSL_API_VERSION >= 3) \
                                            ^

After setting the missing bracket ')' it compiles and runs
diff --git a/src/mod_openssl.c b/src/mod_openssl.c
index 91e04133..16856177 100644
--- a/src/mod_openssl.c
+++ b/src/mod_openssl.c
@@ -3025,7 +3025,7 @@ mod_openssl_ssl_conf_curves(server *srv, plugin_config_socket *s, const buffer *
         && LIBRESSL_VERSION_NUMBER >= 0x2050100fL) \
     || OPENSSL_VERSION_NUMBER >= 0x10101000L
     int rc = SSL_CTX_set1_groups_list(s->ssl_ctx, groups);
-   #elif (defined(BORINGSSL_API_VERSION && BORINGSSL_API_VERSION >= 3) \
+   #elif (defined(BORINGSSL_API_VERSION) && BORINGSSL_API_VERSION >= 3) \
       || OPENSSL_VERSION_NUMBER >= 0x10100000L
     int rc = SSL_CTX_set1_curves_list(s->ssl_ctx, groups);
    #endif


Files

mod_openssl1477.patch (662 Bytes) mod_openssl1477.patch dani254, 2025-02-19 16:24
Actions #1

Updated by gstrauss 3 days ago

  • Category set to TLS
  • Status changed from New to Patch Pending
  • Target version changed from 1.4.xx to 1.4.78

Thank you for the report. Yes, that is a syntax error and will be fixed.

Actions #2

Updated by gstrauss 3 days ago

I am curious: are you using an older TLS library? i.e. boringssl BORINGSSL_API_VERSION < 19, libressl LIBRESSL_VERSION_NUMBER < 0x2050100fL, or OpenSSL < 1.1.1 ?

Or is the preprocessor on your system detecting the syntax error even on a preprocessor line that is not executed?

(The bug is still a syntax error that will be fixed.)

Actions #3

Updated by gstrauss 3 days ago

  • Status changed from Patch Pending to Fixed
Actions #4

Updated by dani254 2 days ago

It is openssl 3.0.15 in opensslv.h. The preprocessor comes with the cross compiler, which is very ancient. So I have no idea.
Thank you for the fix.

Actions

Also available in: Atom