AM_CONDITIONAL(WITH_OPENSSL, [test x"$with_openssl" != xno])
AM_CONDITIONAL(WITH_TOMMATH, [test x"$with_tommath" != xno])
AM_CONDITIONAL(WITH_TOMSFASTMATH, [test x"$with_tfm" != xno])
+AC_CHECK_FUNCS(explicit_bzero memset_s)
AS_IF([test x"$with_tommath" != xno],
[AC_SEARCH_LIBS(mp_init, tommath, ,
#define MEMCPY_BCOPY(d,s,l) bcopy((s), (d), (l))
#endif
+#if HAVE_MEMSET_S
+#undef MEMSET_BZERO
+#define MEMSET_BZERO(p, l) memset_s((p), (l), 0, (l))
+#elif HAVE_EXPLICIT_BZERO
+#undef MEMSET_BZERO
+#define MEMSET_BZERO(p, l) explicit_bzero((p), (l))
+#endif
+
/*** THE SIX LOGICAL FUNCTIONS ****************************************/
/*