Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/apache2/argon2/dist/phc-winner-argon2/src Teach arg...



details:   https://anonhg.NetBSD.org/src/rev/ad0d2386f014
branches:  trunk
changeset: 989861:ad0d2386f014
user:      nia <nia%NetBSD.org@localhost>
date:      Sun Oct 17 10:44:21 2021 +0000

description:
Teach argon2 about explicit_memset(3). Should be upstreamed.

diffstat:

 external/apache2/argon2/dist/phc-winner-argon2/src/core.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (21 lines):

diff -r e89888e44214 -r ad0d2386f014 external/apache2/argon2/dist/phc-winner-argon2/src/core.c
--- a/external/apache2/argon2/dist/phc-winner-argon2/src/core.c Sun Oct 17 10:33:57 2021 +0000
+++ b/external/apache2/argon2/dist/phc-winner-argon2/src/core.c Sun Oct 17 10:44:21 2021 +0000
@@ -125,6 +125,8 @@
 
 #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 @@
     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);



Home | Main Index | Thread Index | Old Index