From 185bfc1af717046391e8b787e29f44f9768d00a7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 18 Dec 2022 00:21:30 -0800 Subject: Remove Gnulib explicit_bzero module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s no longer needed, as it is now merely a thin layer around C23-style memset_explicit and we might as well just call the C23 standard function; that’s more forward-looking. * admin/merge-gnulib (GNULIB_MODULES): Remove explicit_bzero, and add memset_explicit. * lib/explicit_bzero.c, m4/explicit_bzero.m4: Remove these files, which were copied from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * src/gnutls.c (gnutls_symmetric_aead): Use memset_explicit instead of explicit_bzero. --- lib/explicit_bzero.c | 27 --------------------------- lib/gnulib.mk.in | 13 +------------ 2 files changed, 1 insertion(+), 39 deletions(-) delete mode 100644 lib/explicit_bzero.c (limited to 'lib') diff --git a/lib/explicit_bzero.c b/lib/explicit_bzero.c deleted file mode 100644 index fc309f81d61..00000000000 --- a/lib/explicit_bzero.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Erasure of sensitive data, generic implementation. - Copyright (C) 2016-2022 Free Software Foundation, Inc. - - This file is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - This file is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . */ - -#include - -#include - -/* Set LEN bytes of S to 0. The compiler will not delete a call to - this function, even if S is dead after the call. */ -void -explicit_bzero (void *s, size_t len) -{ - memset_explicit (s, 0, len); -} diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index a3ab50f396f..fcbf5bde2db 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -93,7 +93,6 @@ # dup2 \ # environ \ # execinfo \ -# explicit_bzero \ # faccessat \ # fchmodat \ # fcntl \ @@ -126,6 +125,7 @@ # memmem-simple \ # mempcpy \ # memrchr \ +# memset_explicit \ # minmax \ # mkostemp \ # mktime \ @@ -264,7 +264,6 @@ GL_COND_OBJ_DIRFD_CONDITION = @GL_COND_OBJ_DIRFD_CONDITION@ GL_COND_OBJ_DUP2_CONDITION = @GL_COND_OBJ_DUP2_CONDITION@ GL_COND_OBJ_EUIDACCESS_CONDITION = @GL_COND_OBJ_EUIDACCESS_CONDITION@ GL_COND_OBJ_EXECINFO_CONDITION = @GL_COND_OBJ_EXECINFO_CONDITION@ -GL_COND_OBJ_EXPLICIT_BZERO_CONDITION = @GL_COND_OBJ_EXPLICIT_BZERO_CONDITION@ GL_COND_OBJ_FACCESSAT_CONDITION = @GL_COND_OBJ_FACCESSAT_CONDITION@ GL_COND_OBJ_FCHMODAT_CONDITION = @GL_COND_OBJ_FCHMODAT_CONDITION@ GL_COND_OBJ_FCNTL_CONDITION = @GL_COND_OBJ_FCNTL_CONDITION@ @@ -1860,16 +1859,6 @@ EXTRA_DIST += execinfo.in.h endif ## end gnulib module execinfo -## begin gnulib module explicit_bzero -ifeq (,$(OMIT_GNULIB_MODULE_explicit_bzero)) - -ifneq (,$(GL_COND_OBJ_EXPLICIT_BZERO_CONDITION)) -libgnu_a_SOURCES += explicit_bzero.c -endif - -endif -## end gnulib module explicit_bzero - ## begin gnulib module faccessat ifeq (,$(OMIT_GNULIB_MODULE_faccessat)) -- cgit v1.2.1