[exim-cvs] GnuTLS: fix build on older libraries

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] GnuTLS: fix build on older libraries
Gitweb: https://git.exim.org/exim.git/commitdiff/727a5d2511acd513514b52a72f8db294e54f3ae9
Commit:     727a5d2511acd513514b52a72f8db294e54f3ae9
Parent:     3cbde9b9bb9d271f5fd917823a6da7008b14f7d5
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sat Sep 21 23:27:03 2019 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sat Sep 21 23:34:27 2019 +0100


    GnuTLS: fix build on older libraries
---
 src/src/tls-gnu.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)


diff --git a/src/src/tls-gnu.c b/src/src/tls-gnu.c
index f64b0ae..fce4b86 100644
--- a/src/src/tls-gnu.c
+++ b/src/src/tls-gnu.c
@@ -903,6 +903,7 @@ return gnutls_ext_raw_parse(NULL, tls_server_clienthello_ext, msg,
}
#endif

+#if defined(EXPERIMENTAL_TLS_RESUME) || defined(SUPPORT_GNUTLS_EXT_RAW_PARSE)
 /* Callback for certificate-status, on server. We sent stapled OCSP. */
 static int
 tls_server_certstatus_cb(gnutls_session_t session, unsigned int htype,
@@ -925,22 +926,24 @@ tls_server_hook_cb(gnutls_session_t sess, u_int htype, unsigned when,
 {
 switch (htype)
   {
-#ifdef SUPPORT_GNUTLS_EXT_RAW_PARSE
+# ifdef SUPPORT_GNUTLS_EXT_RAW_PARSE
   case GNUTLS_HANDSHAKE_CLIENT_HELLO:
     return tls_server_clienthello_cb(sess, htype, when, incoming, msg);
-#endif
+# endif
   case GNUTLS_HANDSHAKE_CERTIFICATE_STATUS:
     return tls_server_certstatus_cb(sess, htype, when, incoming, msg);
-#ifdef EXPERIMENTAL_TLS_RESUME
+# ifdef EXPERIMENTAL_TLS_RESUME
   case GNUTLS_HANDSHAKE_NEW_SESSION_TICKET:
     return tls_server_ticket_cb(sess, htype, when, incoming, msg);
-#endif
+# endif
   default:
     return 0;
   }
 }
+#endif



+#if !defined(DISABLE_OCSP) && defined(SUPPORT_GNUTLS_EXT_RAW_PARSE)
 static void
 tls_server_testharness_ocsp_fiddle(void)
 {
@@ -952,6 +955,7 @@ if (environ) for (uschar ** p = USS environ; *p; p++)
     exim_testharness_disable_ocsp_validity_check = TRUE;
     }
 }
+#endif


 /*************************************************
 *       Variables re-expanded post-SNI           *