Skip to content

Commit ac0acf0

Browse files
committed
Only define WE_HAVE_TLS1_PRF via the configure script if wolfSSL has support for
it. Only define WE_HAVE_TLS1_PRF if libwolfssl has wc_PRF_TLS and wc_PRF_TLSv1 (which requires WOLFSSL_HAVE_PRF to be defined).
1 parent f09a0b3 commit ac0acf0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

configure.ac

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,16 @@ then
314314
ENABLED_TLS1_PRF="no"
315315
AC_MSG_WARN([--enable-tls1-prf ignored because OpenSSL doesn't have support for NID_tls1_prf.])
316316
else
317-
AM_CFLAGS="$AM_CFLAGS -DWE_HAVE_TLS1_PRF -DWE_HAVE_EVP_PKEY"
317+
AC_CHECK_LIB(wolfssl, wc_PRF_TLS)
318+
AC_CHECK_LIB(wolfssl, wc_PRF_TLSv1)
319+
320+
if test "$ac_cv_lib_wolfssl_wc_PRF_TLS" = "yes" && test "$ac_cv_lib_wolfssl_wc_PRF_TLSv1" = "yes"
321+
then
322+
AM_CFLAGS="$AM_CFLAGS -DWE_HAVE_TLS1_PRF -DWE_HAVE_EVP_PKEY"
323+
else
324+
ENABLED_TLS1_PRF="no"
325+
AC_MSG_WARN([--enable-tls1-prf ignored because wolfSSL doesn't have support for it.])
326+
fi
318327
fi
319328
fi
320329

0 commit comments

Comments
 (0)