0008-src-src-tls-openssl.c-fix-build-with-libressl-3.5.0.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 88f45502272a9a674948204e460ebe90202827d4 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sun, 11 Feb 2024 21:45:42 +0100
  4. Subject: [PATCH] src/src/tls-openssl.c: fix build with libressl >= 3.5.0
  5. OCSP_BASICRESP is an opaque structure since libressl 3.5.0 and
  6. https://github.com/libressl/openbsd/commit/57442b0028fb09287793f279ee57ebb38e9ab954
  7. resulting in the following build failure since version 4.97 and
  8. https://git.exim.org/exim.git/commit/6bf0021993572586f031ac7d973ca33358c2dac8:
  9. In file included from tls.c:473:
  10. tls-openssl.c: In function 'tls_client_stapling_cb':
  11. tls-openssl.c:2652:11: error: invalid use of incomplete typedef 'OCSP_BASICRESP' {aka 'struct ocsp_basic_response_st'}
  12. 2652 | bs->certs
  13. | ^~
  14. Fixes:
  15. - http://autobuild.buildroot.org/results/869fde62128d7b0c65e0ac596a3a3f69b332583d
  16. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  17. Upstream: https://bugs.exim.org/show_bug.cgi?id=3074
  18. ---
  19. src/src/tls-openssl.c | 4 ++++
  20. 1 file changed, 4 insertions(+)
  21. diff --git a/src/tls-openssl.c b/src/tls-openssl.c
  22. index 237303ba9..c7f94c160 100644
  23. --- a/src/tls-openssl.c
  24. +++ b/src/tls-openssl.c
  25. @@ -98,6 +98,10 @@ change this guard and punt the issue for a while longer. */
  26. # define EXIM_HAVE_OPENSSL_CIPHER_GET_ID
  27. #endif
  28. +#if LIBRESSL_VERSION_NUMBER >= 0x3050000fL
  29. +# define EXIM_HAVE_OPENSSL_OCSP_RESP_GET0_CERTS
  30. +#endif
  31. +
  32. #if !defined(LIBRESSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x030000000L)
  33. # define EXIM_HAVE_EXPORT_CHNL_BNGNG
  34. # define EXIM_HAVE_OPENSSL_X509_STORE_GET1_ALL_CERTS
  35. --
  36. 2.43.0