From 22c078ee76bbc729095686eae07250748194df35 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) --- UI/MailPartViewers/GNUmakefile.preamble | 10 ++++++++++ UI/MailPartViewers/UIxMailPartSignedViewer.m | 6 ++++-- 2 files changed, 14 insertions(+), 2 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 091777b90..e3c168f02 100644 --- a/UI/MailPartViewers/UIxMailPartSignedViewer.m +++ b/UI/MailPartViewers/UIxMailPartSignedViewer.m @@ -18,7 +18,8 @@ * Boston, MA 02111-1307, USA. */ -#ifdef HAVE_OPENSSL +#if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS) + #include #include #include @@ -35,7 +36,8 @@ @implementation UIxMailPartSignedViewer : UIxMailPartMixedViewer -#ifdef HAVE_OPENSSL + +#if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS) - (BOOL) supportsSMIME { return YES;