patch-acinclude_lib-checks_m4 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. --- squid-3.4.4.orig/acinclude/lib-checks.m4 2014-03-09 10:40:56.000000000 +0100
  2. +++ squid-3.4.4/acinclude/lib-checks.m4 2014-03-11 19:44:28.088928982 +0100
  3. @@ -95,69 +95,6 @@ AC_DEFUN([SQUID_CHECK_LIBIPHLPAPI],[
  4. SQUID_STATE_ROLLBACK(iphlpapi)
  5. ])
  6. -dnl Checks whether the OpenSSL SSL_get_certificate crashes squid and if a
  7. -dnl workaround can be used instead of using the SSL_get_certificate
  8. -AC_DEFUN([SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS],[
  9. - AH_TEMPLATE(SQUID_SSLGETCERTIFICATE_BUGGY, "Define to 1 if the SSL_get_certificate crashes squid")
  10. - AH_TEMPLATE(SQUID_USE_SSLGETCERTIFICATE_HACK, "Define to 1 to use squid workaround for SSL_get_certificate")
  11. - SQUID_STATE_SAVE(check_SSL_get_certificate)
  12. - LIBS="$SSLLIB $LIBS"
  13. - if test "x$SSLLIBDIR" != "x"; then
  14. - LIBS="$LIBS -Wl,-rpath -Wl,$SSLLIBDIR"
  15. - fi
  16. -
  17. - AC_MSG_CHECKING(whether the SSL_get_certificate is buggy)
  18. - AC_RUN_IFELSE([
  19. - AC_LANG_PROGRAM(
  20. - [
  21. - #include <openssl/ssl.h>
  22. - #include <openssl/err.h>
  23. - ],
  24. - [
  25. - SSLeay_add_ssl_algorithms();
  26. - SSL_CTX *sslContext = SSL_CTX_new(SSLv3_method());
  27. - SSL *ssl = SSL_new(sslContext);
  28. - X509* cert = SSL_get_certificate(ssl);
  29. - return 0;
  30. - ])
  31. - ],
  32. - [
  33. - AC_MSG_RESULT([no])
  34. - ],
  35. - [
  36. - AC_DEFINE(SQUID_SSLGETCERTIFICATE_BUGGY, 1)
  37. - AC_MSG_RESULT([yes])
  38. - ],
  39. - [])
  40. -
  41. - AC_MSG_CHECKING(whether the workaround for SSL_get_certificate works)
  42. - AC_RUN_IFELSE([
  43. - AC_LANG_PROGRAM(
  44. - [
  45. - #include <openssl/ssl.h>
  46. - #include <openssl/err.h>
  47. - ],
  48. - [
  49. - SSLeay_add_ssl_algorithms();
  50. - SSL_CTX *sslContext = SSL_CTX_new(SSLv3_method());
  51. - X509 ***pCert = (X509 ***)sslContext->cert;
  52. - X509 *sslCtxCert = pCert && *pCert ? **pCert : (X509 *)0x1;
  53. - if (sslCtxCert != NULL)
  54. - return 1;
  55. - return 0;
  56. - ])
  57. - ],
  58. - [
  59. - AC_MSG_RESULT([yes])
  60. - AC_DEFINE(SQUID_USE_SSLGETCERTIFICATE_HACK, 1)
  61. - ],
  62. - [
  63. - AC_MSG_RESULT([no])
  64. - ],
  65. -[])
  66. -
  67. -SQUID_STATE_ROLLBACK(check_SSL_get_certificate)
  68. -])
  69. dnl Checks whether the SSL_CTX_new and similar functions require
  70. dnl a const 'SSL_METHOD *' argument