diff options
author | agc <agc> | 2014-03-05 05:25:18 +0000 |
---|---|---|
committer | agc <agc> | 2014-03-05 05:25:18 +0000 |
commit | 7771561e10674d04cefc3aef51a96c45bb833aa7 (patch) | |
tree | d3e3bbda7c626749f2713058e07ae1efb7fde05e /security | |
parent | 7046da6ae5f0704ce00f0f8cd80882b853cf24e5 (diff) | |
download | pkgsrc-7771561e10674d04cefc3aef51a96c45bb833aa7.tar.gz |
Initial import of libmerkletree-20140304 into the Packages Collection
The libmerkletree library implements Merkle tree calculation, and also
includes some higher-level functions to verify a file against a
previously-generated Merkle tree.
A Merkle tree is a hash tree calculated across blocks in data. Any
block size can be specified in this implementation. A digest is
calculated across each block in the data, and then a digest is
calculated across blocks of the checksums, and this continues until
only one block of digest exists. The hierarchical nature of this
allows individual blocks of a file to be verified, even if other parts
of the file have been modified. A degenerate case, in which the data
is less than the blocksize, will mean that a single digest value for
the block is calculated. This will be the same as the digest
algorithm applied to the whole file.
The digest calculations themselves are done by the libmultigest(3)
library, and allow concatenation of multiple digests to produce a
single large digest value.
Diffstat (limited to 'security')
-rw-r--r-- | security/libmerkletree/DESCR | 18 | ||||
-rw-r--r-- | security/libmerkletree/Makefile | 35 | ||||
-rw-r--r-- | security/libmerkletree/PLIST | 4 | ||||
-rw-r--r-- | security/libmerkletree/buildlink3.mk | 13 | ||||
-rw-r--r-- | security/libmerkletree/distinfo | 1 |
5 files changed, 71 insertions, 0 deletions
diff --git a/security/libmerkletree/DESCR b/security/libmerkletree/DESCR new file mode 100644 index 00000000000..8ae7e90dd90 --- /dev/null +++ b/security/libmerkletree/DESCR @@ -0,0 +1,18 @@ +The libmerkletree library implements Merkle tree calculation, and also +includes some higher-level functions to verify a file against a +previously-generated Merkle tree. + +A Merkle tree is a hash tree calculated across blocks in data. Any +block size can be specified in this implementation. A digest is +calculated across each block in the data, and then a digest is +calculated across blocks of the checksums, and this continues until +only one block of digest exists. The hierarchical nature of this +allows individual blocks of a file to be verified, even if other parts +of the file have been modified. A degenerate case, in which the data +is less than the blocksize, will mean that a single digest value for +the block is calculated. This will be the same as the digest +algorithm applied to the whole file. + +The digest calculations themselves are done by the libmultigest(3) +library, and allow concatenation of multiple digests to produce a +single large digest value. diff --git a/security/libmerkletree/Makefile b/security/libmerkletree/Makefile new file mode 100644 index 00000000000..f9fb0dd2b37 --- /dev/null +++ b/security/libmerkletree/Makefile @@ -0,0 +1,35 @@ +# $NetBSD: Makefile,v 1.1.1.1 2014/03/05 05:25:18 agc Exp $ + +DISTNAME= libmerkletree-${VERSION} +CATEGORIES= security +MASTER_SITES= # empty +DISTFILES= # empty + +MAINTAINER= agc@NetBSD.org +HOMEPAGE= http://www.NetBSD.org/ +COMMENT= Calculate and verify Merkle tree digests +LICENSE= modified-bsd + +FILESDIR= ${.CURDIR}/../../security/merkletree/files + +GNU_CONFIGURE= yes +.if !defined(BOOTSTRAP) +USE_LIBTOOL= yes +.endif +AUTO_MKDIRS= yes + +.include "../../mk/bsd.prefs.mk" + +VERSION!= ${AWK} '/\#define.*MERKLETREE_H_/ {print $$3}' ${FILESDIR}/merkletree.h + +do-extract: + ${CP} -R ${FILESDIR} ${WRKSRC} +.if defined(BOOTSTRAP) + cd ${WRKSRC} && ${CP} Makefile.lib.in Makefile.in +.else + cd ${WRKSRC} && ${CP} Makefile.libtool.in Makefile.in +.endif + +.include "../../security/libmultigest/buildlink3.mk" + +.include "../../mk/bsd.pkg.mk" diff --git a/security/libmerkletree/PLIST b/security/libmerkletree/PLIST new file mode 100644 index 00000000000..c50f8ab19e2 --- /dev/null +++ b/security/libmerkletree/PLIST @@ -0,0 +1,4 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2014/03/05 05:25:18 agc Exp $ +include/merkletree.h +lib/libmerkletree.la +man/man3/libmerkletree.3 diff --git a/security/libmerkletree/buildlink3.mk b/security/libmerkletree/buildlink3.mk new file mode 100644 index 00000000000..9658c6eeabe --- /dev/null +++ b/security/libmerkletree/buildlink3.mk @@ -0,0 +1,13 @@ +# $NetBSD: buildlink3.mk,v 1.1.1.1 2014/03/05 05:25:18 agc Exp $ + +BUILDLINK_TREE+= libmerkletree + +.if !defined(LIBMERKLETREE_BUILDLINK3_MK) +LIBMERKLETREE_BUILDLINK3_MK:= + +BUILDLINK_API_DEPENDS.libmerkletree+= libmerkletree>=20140303 +BUILDLINK_PKGSRCDIR.libmerkletree?= ../../security/libmerkletree + +.endif # LIBMERKLETREE_BUILDLINK3_MK + +BUILDLINK_TREE+= -libmerkletree diff --git a/security/libmerkletree/distinfo b/security/libmerkletree/distinfo new file mode 100644 index 00000000000..09e5aa43cb4 --- /dev/null +++ b/security/libmerkletree/distinfo @@ -0,0 +1 @@ +$NetBSD: distinfo,v 1.1.1.1 2014/03/05 05:25:18 agc Exp $ |