add win32-specific explicit_bzero implementation
This commit is contained in:
@@ -34,8 +34,12 @@ libcompatnoopt_la_CFLAGS = -O0
|
||||
libcompatnoopt_la_SOURCES =
|
||||
|
||||
if !HAVE_EXPLICIT_BZERO
|
||||
if HOST_WIN
|
||||
libcompatnoopt_la_SOURCES += compat/explicit_bzero_win.c
|
||||
else
|
||||
libcompatnoopt_la_SOURCES += compat/explicit_bzero.c
|
||||
endif
|
||||
endif
|
||||
|
||||
# other compatibility functions
|
||||
libcompat_la_SOURCES =
|
||||
|
13
crypto/compat/explicit_bzero_win.c
Normal file
13
crypto/compat/explicit_bzero_win.c
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Public domain.
|
||||
* Win32 explicit_bzero compatibility shim.
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
|
||||
void
|
||||
explicit_bzero(void *buf, size_t len)
|
||||
{
|
||||
SecureZeroMemory(buf, len);
|
||||
}
|
Reference in New Issue
Block a user