Builtin macros for sha3-hash and ed25519-signing support
[exim.git] / src / src / pdkim / signing.c
index f73fa9cc8f00631f0cd158abd6a854877afd7ffb..b61b428327292cf6bad504a44bdf824b26e2245f 100644 (file)
@@ -7,16 +7,31 @@
  */
 
 #include "../exim.h"
+#include "crypt_ver.h"
+#include "signing.h"
+
+
+#ifdef MACRO_PREDEF
+# include "../macro_predef.h"
+
+void
+features_crypto(void)
+{
+# ifdef SIGN_HAVE_ED25519
+  builtin_macro_create(US"_CRYPTO_SIGN_ED25519");
+# endif
+# ifdef EXIM_HAVE_SHA3
+  builtin_macro_create(US"_CRYPTO_HASH_SHA3");
+# endif
+}
+#else
 
-#ifndef DISABLE_DKIM   /* entire file */
+#ifndef DISABLE_DKIM   /* rest of file */
 
 #ifndef SUPPORT_TLS
 # error Need SUPPORT_TLS for DKIM
 #endif
 
-#include "crypt_ver.h"
-#include "signing.h"
-
 
 /******************************************************************************/
 #ifdef SIGN_GNUTLS
@@ -884,4 +899,5 @@ switch (hash)
 /******************************************************************************/
 
 #endif /*DISABLE_DKIM*/
+#endif /*MACRO_PREDEF*/
 /* End of File */