From 8d1b02d52ba8cf3df45bd43964c819837085ec4c Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Tue, 4 Jul 2017 11:00:06 -0400 Subject: [PATCH] (fix) enable S/MIME even when using GNU TLS (fixes #4201) Conflicts: UI/MailPartViewers/UIxMailPartSignedViewer.m --- UI/MailPartViewers/GNUmakefile.preamble | 10 ++++++++++ UI/MailPartViewers/UIxMailPartSignedViewer.m | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/UI/MailPartViewers/GNUmakefile.preamble b/UI/MailPartViewers/GNUmakefile.preamble index 15440fbdd..ea7a2d465 100644 --- a/UI/MailPartViewers/GNUmakefile.preamble +++ b/UI/MailPartViewers/GNUmakefile.preamble @@ -1,3 +1,13 @@ +ifeq ($(HAS_LIBRARY_gnutls),yes) +ADDITIONAL_CPPFLAGS += -DHAVE_GNUTLS=1 +SOGo_LIBRARIES_DEPEND_UPON += -lgnutls +else +ifeq ($(HAS_LIBRARY_ssl),yes) +ADDITIONAL_CPPFLAGS += -DHAVE_OPENSSL=1 +SOGo_LIBRARIES_DEPEND_UPON += -lcrypto +endif +endif + ifeq ($(HAS_LIBRARY_ssl),yes) ADDITIONAL_CPPFLAGS += -DHAVE_OPENSSL=1 BUNDLE_LIBS += -lcrypto diff --git a/UI/MailPartViewers/UIxMailPartSignedViewer.m b/UI/MailPartViewers/UIxMailPartSignedViewer.m index 16692657a..a8f149a9d 100644 --- a/UI/MailPartViewers/UIxMailPartSignedViewer.m +++ b/UI/MailPartViewers/UIxMailPartSignedViewer.m @@ -21,8 +21,7 @@ * Boston, MA 02111-1307, USA. */ -#include -#ifdef HAVE_OPENSSL +#if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS) #include #include #include @@ -37,7 +36,8 @@ @implementation UIxMailPartSignedViewer : UIxMailPartMixedViewer -#ifdef HAVE_OPENSSL + +#if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS) - (BOOL) supportsSMIME { return YES;