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;