Skip to content

Commit d505277

Browse files
committed
Fix wolfSSL library detection
The wolfSSL compat layer for CyaSSL is not available during AC_SEARCH_LIBS. To locate wolfSSL, we have to provide a new-style function name.
1 parent cbd199f commit d505277

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

configure.in

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,16 @@ AC_DEFUN([BB_CYASSL],
9090
[
9191
AC_ARG_ENABLE(cyassl, [ --enable-cyassl enable TLS support for auth server communication (no)], [], [enable_cyassl=no])
9292
if test "x$enable_cyassl" = xyes; then
93+
# CyaSSL has been renamed wolfSSL. Old method names are still available
94+
# via cyassl/ssl.h, which maps old methods to new methods via macros.
95+
# To find the proper lib to link against (cyassl or wolfssl), we do have
96+
# the use the new naming scheme below as cyassl/ssl.h is not available for
97+
# AC_SEARCH_LIBS
9398
AC_CHECK_HEADERS(cyassl/ssl.h)
94-
AC_SEARCH_LIBS([CyaTLSv1_client_method], [cyassl wolfssl], [], [
95-
AC_MSG_ERROR([unable to find the CyaTLSv1_client_method function.])
99+
AC_SEARCH_LIBS([CyaTLSv1_client_method], [cyassl], [], [
100+
AC_SEARCH_LIBS([wolfTLSv1_client_method], [wolfssl], [], [
101+
AC_MSG_ERROR([unable to locate SSL lib: either wolfSSL or CyaSSL needed.])
102+
])
96103
])
97104
AC_DEFINE(USE_CYASSL,, "Compile with CyaSSL support")
98105
fi

0 commit comments

Comments
 (0)