summaryrefslogtreecommitdiff
path: root/lib/zebra.h
diff options
context:
space:
mode:
authorLoganaden Velvindron <logan@cyberstorm.mu>2022-05-07 21:23:09 +0400
committerLoganaden Velvindron <logan@cyberstorm.mu>2022-05-31 18:00:18 +0400
commit04b4b595d3582972db55b45ece64e8ed8e758a87 (patch)
tree62b2fed4992f6d81711a00ba76db5b629966f3ff /lib/zebra.h
parent0ef5ec616b6de47ad7e8cd229dcf11f99dce65fd (diff)
lib/md5,lib/sha256: Use explicit_bzero to clean up sensitive data.
explicit_bzero() is available as an API to clean up sensitive data and avoid compiler optimizations that remove calls to memset() or bzero(). Signed-off-by: Loganaden Velvindron <logan@cyberstorm.mu>
Diffstat (limited to 'lib/zebra.h')
-rw-r--r--lib/zebra.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/zebra.h b/lib/zebra.h
index e8ddd869bb..53ae5b4e9e 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -230,6 +230,10 @@ size_t strlcpy(char *__restrict dest,
const char *__restrict src, size_t destsize);
#endif
+#ifndef HAVE_EXPLICIT_BZERO
+void explicit_bzero(void *buf, size_t len);
+#endif
+
#if !defined(HAVE_STRUCT_MMSGHDR_MSG_HDR) || !defined(HAVE_SENDMMSG)
/* avoid conflicts in case we have partial support */
#define mmsghdr frr_mmsghdr