You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.7 KiB

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