packages/net/wifidog/patches/010-use-tls-above-1.patch
Ilya Lipnitskiy 5d8d4fbbcb
treewide: Run refresh on all packages
The crude loop I wrote to come up with this changeset:

  find -L package/feeds/packages/ -name patches | \
  sed 's/patches$/refresh/' | sort | xargs make

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-20 16:02:15 -08:00

34 lines
1.6 KiB
Diff

--- a/configure.in
+++ b/configure.in
@@ -96,8 +96,8 @@ if test "x$enable_cyassl" = xyes; then
# the use the new naming scheme below as cyassl/ssl.h is not available for
# AC_SEARCH_LIBS
AC_CHECK_HEADERS(cyassl/ssl.h)
- AC_SEARCH_LIBS([CyaTLSv1_client_method], [cyassl], [], [
- AC_SEARCH_LIBS([wolfTLSv1_client_method], [wolfssl], [], [
+ AC_SEARCH_LIBS([CyaSSLv23_client_method], [cyassl], [], [
+ AC_SEARCH_LIBS([wolfSSLv23_client_method], [wolfssl], [], [
AC_MSG_ERROR([unable to locate SSL lib: either wolfSSL or CyaSSL needed.])
])
])
@@ -110,7 +110,7 @@ if test "x$enable_cyassl" = xyes; then
]], [[
CYASSL_CTX *ctx;
CyaSSL_Init();
- ctx = CyaSSL_CTX_new(CyaTLSv1_client_method());
+ ctx = CyaSSL_CTX_new(CyaSSLv23_client_method());
CyaSSL_CTX_UseSNI(ctx, CYASSL_SNI_HOST_NAME, "wifidog.org", 11);
]])], [enabled_sni=yes], [enabled_sni=no])
--- a/src/simple_http.c
+++ b/src/simple_http.c
@@ -162,8 +162,7 @@ get_cyassl_ctx(const char *hostname)
if (NULL == cyassl_ctx) {
CyaSSL_Init();
/* Create the CYASSL_CTX */
- /* Allow TLSv1.0 up to TLSv1.2 */
- if ((cyassl_ctx = CyaSSL_CTX_new(CyaTLSv1_client_method())) == NULL) {
+ if ((cyassl_ctx = CyaSSL_CTX_new(CyaSSLv23_client_method())) == NULL) {
debug(LOG_ERR, "Could not create CYASSL context.");
UNLOCK_CYASSL_CTX();
return NULL;