diff --git a/UI/MailPartViewers/GNUmakefile.preamble b/UI/MailPartViewers/GNUmakefile.preamble index 15440fbddc..ea7a2d4650 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 091777b906..e3c168f02f 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;