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