Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Merge remote-tracking branch 'upstream/master'
Shawn Webb committed 2 years ago
commit 5856096c9051e4dc8c01f70806d9c443ba9c0266
parent 4246b71
2 files changed +7 -1
modified libpkg/Makefile.autosetup
@@ -91,6 +91,8 @@ LOCAL_LDFLAGS= @waflags@ \
		-L$(top_builddir)/compat -lbsd_compat_pic \
		-L$(top_builddir)/external/libcurl -lcurl_pic \
		-L$(top_builddir)/external/liblua -llua_pic \
+
		-L$(top_builddir)/external/libder -lder_pic \
+
		-L$(top_builddir)/external/libecc -lecc_pic \
		@nowaflags@ \
		-lssl \
		-lcrypto \
modified libpkg/pkgsign_ecc.c
@@ -31,6 +31,7 @@

#include <ctype.h>
#include <fcntl.h>
+
#include <strings.h>

#include <libder.h>

@@ -886,6 +887,7 @@ _load_private_key(struct ecc_sign_ctx *keyinfo)
	}

out:
+
	explicit_bzero(keybuf, sizeof(keybuf));
	free(filedata);
	if (fd != -1)
		close(fd);
@@ -1247,9 +1249,11 @@ ecc_new(const char *name __unused, struct pkgsign_ctx *sctx)
}

static void
-
ecc_free(struct pkgsign_ctx *sctx __unused)
+
ecc_free(struct pkgsign_ctx *sctx)
{
+
	struct ecc_sign_ctx *keyinfo = ECC_CTX(sctx);

+
	explicit_bzero(&keyinfo->keypair, sizeof(keyinfo->keypair));
}

const struct pkgsign_ops pkgsign_ecc = {