Commit Graph

4 Commits

Author SHA1 Message Date
Matthias Clasen
e0b1c3e8b0 win32: Fix compiler warnings
The compiler informs me that GetLastError() return a DWORD,
so use %lx to print it.
2020-09-19 08:29:29 -04:00
Chun-wei Fan
3095bccd2e gtksecurememory.c: Port secure memory allocation to Windows
Use the Windows API CryptProtectMemory() to encrypt the data that we want to
secure, and use CryptUnprotectMemory() to de-crypt the secured data that we
want to access, since mmap() and mlock() are not available on Windows.
2020-09-09 13:50:15 +08:00
Chun-wei Fan
c72b2f6167 gtksecurememory.c: Don't include unistd.h unconditionally
It is not universally available on non-POSIX systems.
2020-09-09 13:48:33 +08:00
Emmanuele Bassi
31a7574544 Import egg-secure-memory allocator from gcr
We can re-use the code inside gcr, as we know that it's working, tested,
and license compatible.
2020-09-08 23:50:12 +01:00