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.

49 lines
1.3 KiB

  1. From 8212b89f1a04023b431d2fc9bc12aca02394698f Mon Sep 17 00:00:00 2001
  2. From: Bruno Silvestre <bruno.silvestre@gmail.com>
  3. Date: Fri, 29 Jun 2018 14:02:39 -0300
  4. Subject: [PATCH 1/3] Using 'const SSL_METHOD*'
  5. This change was introduced in OpenSSL 1.0.0.
  6. Start droping 0.9.8 code.
  7. ---
  8. src/context.c | 10 ++--------
  9. 1 file changed, 2 insertions(+), 8 deletions(-)
  10. diff --git a/src/context.c b/src/context.c
  11. index a2b5ae5..b9e8cda 100644
  12. --- a/src/context.c
  13. +++ b/src/context.c
  14. @@ -29,12 +29,6 @@
  15. #include "ec.h"
  16. #endif
  17. -#if (OPENSSL_VERSION_NUMBER >= 0x1000000fL)
  18. -typedef const SSL_METHOD LSEC_SSL_METHOD;
  19. -#else
  20. -typedef SSL_METHOD LSEC_SSL_METHOD;
  21. -#endif
  22. -
  23. /*--------------------------- Auxiliary Functions ----------------------------*/
  24. /**
  25. @@ -68,7 +62,7 @@ static int set_option_flag(const char *opt, unsigned long *flag)
  26. /**
  27. * Find the protocol.
  28. */
  29. -static LSEC_SSL_METHOD* str2method(const char *method)
  30. +static const SSL_METHOD* str2method(const char *method)
  31. {
  32. if (!strcmp(method, "any")) return SSLv23_method();
  33. if (!strcmp(method, "sslv23")) return SSLv23_method(); // deprecated
  34. @@ -287,7 +281,7 @@ static int create(lua_State *L)
  35. {
  36. p_context ctx;
  37. const char *str_method;
  38. - LSEC_SSL_METHOD *method;
  39. + const SSL_METHOD *method;
  40. str_method = luaL_checkstring(L, 1);
  41. method = str2method(str_method);
  42. --
  43. 2.19.1