add win32-specific explicit_bzero implementation
This commit is contained in:
parent
058e3ebe77
commit
c66d80a438
1
.gitignore
vendored
1
.gitignore
vendored
@ -120,6 +120,7 @@ include/openssl/*.he
|
||||
!/crypto/Makefile.am.*
|
||||
!/crypto/compat/arc4random.h
|
||||
!/crypto/compat/b_win.c
|
||||
!/crypto/compat/explicit_bzero_win.c
|
||||
!/crypto/compat/posix_win.c
|
||||
!/crypto/compat/bsd_asprintf.c
|
||||
!/crypto/compat/inet_pton.c
|
||||
|
@ -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);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user