Skip to content

[Build-System] sac-openssl.m4: probe TLS_method to detect libssl (OpenSSL 4) - #3211

Open
bereizy wants to merge 1 commit into
signalwire:masterfrom
bereizy:sac-openssl-tls-method
Open

bereizy wants to merge 1 commit into
signalwire:masterfrom
bereizy:sac-openssl-tls-method

Conversation

@bereizy

@bereizy bereizy commented Oct 2, 2026

Copy link
Copy Markdown

SAC_OPENSSL decides whether libssl is usable with AC_CHECK_LIB(ssl, TLSv1_method). OpenSSL 4.0 removed the fixed-version method functions, so on 4.0 the probe fails, HAVE_TLS is cleared and -lssl is not added to LIBS:

checking for TLSv1_method in -lssl... no
configure: WARNING: OpenSSL protocol library was not found

With #3185 applied, configure then succeeds, but the build stops when linking mod_sofia's test program:

ld: ./.libs/libsofiamod.a(libsofiamod_la-sofia.o): undefined reference to symbol 'SSL_CTX_check_private_key@@OPENSSL_4.0.0'
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:1019: test/test_sofia_funcs] Error 1

This changes the probe to TLS_method, which is available from OpenSSL 1.1.0 on. Tested by building against OpenSSL 4.0.3 (with #3185) and starting the resulting build.

Related: #3159. The same macro in sofia-sip is covered by freeswitch/sofia-sip#337.

…nSSL 4)

SAC_OPENSSL decides whether libssl is usable with
AC_CHECK_LIB(ssl, TLSv1_method). OpenSSL 4.0 removed the fixed-version
method functions, so the probe fails there, HAVE_TLS is cleared and -lssl
is not added to LIBS. With signalwire#3185 applied configure then succeeds but the
build stops when linking mod_sofia's test program:

  undefined reference to symbol 'SSL_CTX_check_private_key@@OPENSSL_4.0.0'

TLS_method is available from OpenSSL 1.1.0 on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant