0001-enable-libressl.patch 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. Fetched from upstream git and tweaked for the release:
  2. https://gitlab.com/fetchmail/fetchmail/commit/a2ae6f8d15d7caf815d7bdd13df833fd1b2af5cc
  3. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  4. diff -Nura fetchmail-6.3.26.orig/config.h.in fetchmail-6.3.26/config.h.in
  5. --- fetchmail-6.3.26.orig/config.h.in 2015-12-30 10:44:33.467746835 -0300
  6. +++ fetchmail-6.3.26/config.h.in 2015-12-30 10:45:50.271403589 -0300
  7. @@ -53,6 +53,10 @@
  8. if you don't. */
  9. #undef HAVE_DECL_SSLV2_CLIENT_METHOD
  10. +/* Define to 1 if you have the declaration of `SSLv3_client_method', and to 0
  11. + if you don't. */
  12. +#undef HAVE_DECL_SSLV3_CLIENT_METHOD
  13. +
  14. /* Define to 1 if you have the declaration of `strerror', and to 0 if you
  15. don't. */
  16. #undef HAVE_DECL_STRERROR
  17. diff -Nura fetchmail-6.3.26.orig/configure.ac fetchmail-6.3.26/configure.ac
  18. --- fetchmail-6.3.26.orig/configure.ac 2015-12-30 10:44:33.465746766 -0300
  19. +++ fetchmail-6.3.26/configure.ac 2015-12-30 10:46:03.708868409 -0300
  20. @@ -803,6 +803,7 @@
  21. case "$LIBS" in *-lssl*)
  22. AC_CHECK_DECLS([SSLv2_client_method],,,[#include <openssl/ssl.h>])
  23. + AC_CHECK_DECLS([SSLv3_client_method],,,[#include <openssl/ssl.h>])
  24. ;;
  25. esac
  26. diff -Nura fetchmail-6.3.26.orig/fetchmail.c fetchmail-6.3.26/fetchmail.c
  27. --- fetchmail-6.3.26.orig/fetchmail.c 2015-12-30 10:44:33.469746904 -0300
  28. +++ fetchmail-6.3.26/fetchmail.c 2015-12-30 10:46:03.708868409 -0300
  29. @@ -263,6 +263,12 @@
  30. #ifdef SSL_ENABLE
  31. "+SSL"
  32. #endif
  33. +#if HAVE_DECL_SSLV2_CLIENT_METHOD + 0 == 0
  34. + "-SSLv2"
  35. +#endif
  36. +#if HAVE_DECL_SSLV3_CLIENT_METHOD + 0 == 0
  37. + "-SSLv3"
  38. +#endif
  39. #ifdef OPIE_ENABLE
  40. "+OPIE"
  41. #endif /* OPIE_ENABLE */
  42. diff -Nura fetchmail-6.3.26.orig/socket.c fetchmail-6.3.26/socket.c
  43. --- fetchmail-6.3.26.orig/socket.c 2015-12-30 10:44:33.464746731 -0300
  44. +++ fetchmail-6.3.26/socket.c 2015-12-30 10:46:03.709868443 -0300
  45. @@ -910,11 +910,16 @@
  46. #if HAVE_DECL_SSLV2_CLIENT_METHOD + 0 > 0
  47. _ctx[sock] = SSL_CTX_new(SSLv2_client_method());
  48. #else
  49. - report(stderr, GT_("Your operating system does not support SSLv2.\n"));
  50. + report(stderr, GT_("Your OpenSSL version does not support SSLv2.\n"));
  51. return -1;
  52. #endif
  53. } else if(!strcasecmp("ssl3",myproto)) {
  54. +#if HAVE_DECL_SSLV3_CLIENT_METHOD + 0 > 0
  55. _ctx[sock] = SSL_CTX_new(SSLv3_client_method());
  56. +#else
  57. + report(stderr, GT_("Your OpenSSL version does not support SSLv3.\n"));
  58. + return -1;
  59. +#endif
  60. } else if(!strcasecmp("tls1",myproto)) {
  61. _ctx[sock] = SSL_CTX_new(TLSv1_client_method());
  62. } else if (!strcasecmp("ssl23",myproto)) {