SSL_OP_NO_COMPRESSION not declared when building with OpenSSL 0.9.8k #423

Closed
opened 2026-10-05 04:20:03 +02:00 by adam · 0 comments
Owner

Attempting to build ZNC 1.5 from git (commit id c8f49e1da0) on Ubuntu 10.04 Lucid Lynx I got the following error:

Building core object Csocket...
src/Csocket.cpp: In member function ?bool Csock::ConfigureCTXOptions(SSL_CTX*)?:
src/Csocket.cpp:1420:19: error: ?SSL_OP_NO_COMPRESSION? was not declared in this scope
    uCTXOptions |= SSL_OP_NO_COMPRESSION;
                   ^
make: *** [src/Csocket.o] Error 1

Some googling suggests that SSL_OP_NO_COMPRESSION was added in OpenSSL 0.9.9. I've worked around by adding

#ifndef SSL_OP_NO_COMPRESSION
#define SSL_OP_NO_COMPRESSION 0
#endif

to Csocket.c, which allows the file to compile, however I'm not sure if this is masking other potential problems related to using an outdated OpenSSL.

I suggest that if ZNC actually requires a newer version of OpenSSL then this should be tested for in the configure script, and if not, then my workaround should be added to allow it to build on older distros.

Attempting to build ZNC 1.5 from git (commit id c8f49e1da02049d369eff5a1659fdd2314525ebd) on Ubuntu 10.04 Lucid Lynx I got the following error: ``` Building core object Csocket... src/Csocket.cpp: In member function ?bool Csock::ConfigureCTXOptions(SSL_CTX*)?: src/Csocket.cpp:1420:19: error: ?SSL_OP_NO_COMPRESSION? was not declared in this scope uCTXOptions |= SSL_OP_NO_COMPRESSION; ^ make: *** [src/Csocket.o] Error 1 ``` Some googling suggests that `SSL_OP_NO_COMPRESSION` was added in OpenSSL 0.9.9. I've worked around by adding ``` #ifndef SSL_OP_NO_COMPRESSION #define SSL_OP_NO_COMPRESSION 0 #endif ``` to Csocket.c, which allows the file to compile, however I'm not sure if this is masking other potential problems related to using an outdated OpenSSL. I suggest that if ZNC actually requires a newer version of OpenSSL then this should be tested for in the `configure` script, and if not, then my workaround should be added to allow it to build on older distros. <!-- github-sync-id:51501589 -->
adam closed this issue 2026-10-05 04:20:03 +02:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#423