Module Name: src Committed By: nia Date: Sun Oct 17 10:44:21 UTC 2021
Modified Files: src/external/apache2/argon2/dist/phc-winner-argon2/src: core.c Log Message: Teach argon2 about explicit_memset(3). Should be upstreamed. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/external/apache2/argon2/dist/phc-winner-argon2/src/core.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/apache2/argon2/dist/phc-winner-argon2/src/core.c diff -u src/external/apache2/argon2/dist/phc-winner-argon2/src/core.c:1.1 src/external/apache2/argon2/dist/phc-winner-argon2/src/core.c:1.2 --- src/external/apache2/argon2/dist/phc-winner-argon2/src/core.c:1.1 Wed Oct 9 13:13:09 2019 +++ src/external/apache2/argon2/dist/phc-winner-argon2/src/core.c Sun Oct 17 10:44:21 2021 @@ -125,6 +125,8 @@ void free_memory(const argon2_context *c #if defined(__OpenBSD__) #define HAVE_EXPLICIT_BZERO 1 +#elif defined(__NetBSD__) +#define HAVE_EXPLICIT_MEMSET 1 #elif defined(__GLIBC__) && defined(__GLIBC_PREREQ) #if __GLIBC_PREREQ(2,25) #define HAVE_EXPLICIT_BZERO 1 @@ -138,6 +140,8 @@ void NOT_OPTIMIZED secure_wipe_memory(vo memset_s(v, n, 0, n); #elif defined(HAVE_EXPLICIT_BZERO) explicit_bzero(v, n); +#elif defined(HAVE_EXPLICIT_MEMSET) + explicit_memset(v, 0, n); #else static void *(*const volatile memset_sec)(void *, int, size_t) = &memset; memset_sec(v, 0, n);