blob: 71273a9833f1741fa771dbbd1c769b147cd96531 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001--- a/configure.in
2+++ b/configure.in
3@@ -96,8 +96,8 @@ if test "x$enable_cyassl" = xyes; then
4 # the use the new naming scheme below as cyassl/ssl.h is not available for
5 # AC_SEARCH_LIBS
6 AC_CHECK_HEADERS(cyassl/ssl.h)
7- AC_SEARCH_LIBS([CyaTLSv1_client_method], [cyassl], [], [
8- AC_SEARCH_LIBS([wolfTLSv1_client_method], [wolfssl], [], [
9+ AC_SEARCH_LIBS([CyaSSLv23_client_method], [cyassl], [], [
10+ AC_SEARCH_LIBS([wolfSSLv23_client_method], [wolfssl], [], [
11 AC_MSG_ERROR([unable to locate SSL lib: either wolfSSL or CyaSSL needed.])
12 ])
13 ])
14@@ -110,7 +110,7 @@ if test "x$enable_cyassl" = xyes; then
15 ]], [[
16 CYASSL_CTX *ctx;
17 CyaSSL_Init();
18- ctx = CyaSSL_CTX_new(CyaTLSv1_client_method());
19+ ctx = CyaSSL_CTX_new(CyaSSLv23_client_method());
20 CyaSSL_CTX_UseSNI(ctx, CYASSL_SNI_HOST_NAME, "wifidog.org", 11);
21 ]])], [enabled_sni=yes], [enabled_sni=no])
22
23--- a/src/simple_http.c
24+++ b/src/simple_http.c
25@@ -162,8 +162,7 @@ get_cyassl_ctx(const char *hostname)
26 if (NULL == cyassl_ctx) {
27 CyaSSL_Init();
28 /* Create the CYASSL_CTX */
29- /* Allow TLSv1.0 up to TLSv1.2 */
30- if ((cyassl_ctx = CyaSSL_CTX_new(CyaTLSv1_client_method())) == NULL) {
31+ if ((cyassl_ctx = CyaSSL_CTX_new(CyaSSLv23_client_method())) == NULL) {
32 debug(LOG_ERR, "Could not create CYASSL context.");
33 UNLOCK_CYASSL_CTX();
34 return NULL;