Check for SecureZeroMemory at compile time.
This commit is contained in:
parent
3c5c23a64b
commit
7ba8af5936
@ -148,6 +148,10 @@ dnl Checks for typedefs, structures, and compiler characteristics.
|
|||||||
|
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
|
dnl Checks for functions and headers
|
||||||
|
|
||||||
|
AC_CHECK_FUNCS([SecureZeroMemory])
|
||||||
|
|
||||||
dnl Switches.
|
dnl Switches.
|
||||||
|
|
||||||
AC_ARG_ENABLE(pie,
|
AC_ARG_ENABLE(pie,
|
||||||
|
@ -51,7 +51,7 @@ static Salsa20Random stream = {
|
|||||||
static void
|
static void
|
||||||
sodium_memzero(void * const pnt, const size_t size)
|
sodium_memzero(void * const pnt, const size_t size)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef HAVE_SECUREZEROMEMORY
|
||||||
SecureZeroMemory(pnt, size);
|
SecureZeroMemory(pnt, size);
|
||||||
#else
|
#else
|
||||||
volatile unsigned char *pnt_ = (volatile unsigned char *) pnt;
|
volatile unsigned char *pnt_ = (volatile unsigned char *) pnt;
|
||||||
|
Loading…
Reference in New Issue
Block a user