diff --git a/crypto/external/cpl/tpm-tools/Makefile b/crypto/external/cpl/tpm-tools/Makefile new file mode 100644 index 000000000000..a5d66583a5be --- /dev/null +++ b/crypto/external/cpl/tpm-tools/Makefile @@ -0,0 +1,3 @@ +# $NetBSD: Makefile,v 1.1 2012/01/28 16:04:12 christos Exp $ +SUBDIR=lib .WAIT bin +.include diff --git a/crypto/external/cpl/tpm-tools/Makefile.inc b/crypto/external/cpl/tpm-tools/Makefile.inc new file mode 100644 index 000000000000..b0428aaee19c --- /dev/null +++ b/crypto/external/cpl/tpm-tools/Makefile.inc @@ -0,0 +1,9 @@ +# $NetBSD: Makefile.inc,v 1.1 2012/01/28 16:04:12 christos Exp $ + +.include + +TPM_TOOLS=${NETBSDSRCDIR}/crypto/external/cpl/tpm-tools +DIST=${TPM_TOOLS}/dist + +CPPFLAGS+= -I${TPM_TOOLS}/include -I${DIST}/include +CPPFLAGS+= -DHAVE_CONFIG_H -D_LINUX -DTSS_LIB_IS_12 diff --git a/crypto/external/cpl/tpm-tools/bin/Makefile b/crypto/external/cpl/tpm-tools/bin/Makefile new file mode 100644 index 000000000000..0bae34e7c84f --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/Makefile @@ -0,0 +1,33 @@ +# $NetBSD: Makefile,v 1.1 2012/01/28 16:04:12 christos Exp $ +.include +SUBDIR = ${TPM_MGMT} ${CMDS} + +TPM_MGMT=\ +tpm_changeownerauth \ +tpm_clear \ +tpm_createek \ +tpm_getpubek \ +tpm_restrictpubek \ +tpm_setactive \ +tpm_setenable \ +tpm_setclearable \ +tpm_setownable \ +tpm_setpresence \ +tpm_takeownership \ +tpm_version \ +tpm_selftest \ +tpm_nvdefine \ +tpm_nvinfo \ +tpm_nvread \ +tpm_nvrelease \ +tpm_nvwrite \ +tpm_resetdalock \ +tpm_restrictsrk \ +tpm_revokeek \ +tpm_setoperatorauth + +CMDS=\ +tpm_sealdata \ +tpm_unsealdata + +.include diff --git a/crypto/external/cpl/tpm-tools/bin/Makefile.inc b/crypto/external/cpl/tpm-tools/bin/Makefile.inc new file mode 100644 index 000000000000..9c1673e503c1 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/Makefile.inc @@ -0,0 +1,2 @@ +# $NetBSD: Makefile.inc,v 1.1 2012/01/28 16:04:12 christos Exp $ +.include "../Makefile.inc" diff --git a/crypto/external/cpl/tpm-tools/bin/Makefile.prog b/crypto/external/cpl/tpm-tools/bin/Makefile.prog new file mode 100644 index 000000000000..7a5b8a09ff56 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/Makefile.prog @@ -0,0 +1,56 @@ +# $NetBSD: Makefile.prog,v 1.1 2012/01/28 16:04:12 christos Exp $ +.include "../Makefile.inc" + +PROG=${.CURDIR:T} +.if "${PROG:M*sealdata}" != "" +.PATH.c: ${DIST}/src/cmds +.else +.PATH.c: ${DIST}/src/tpm_mgmt +.endif + +.if "${PROG:Mtpm_nv*}" != "" +SRCS=${PROG}.c tpm_nvcommon.c +.elif ${PROG} == "tpm_setoperatorauth" +.elif ${PROG} == "tpm_changeownerauth" +SRCS=tpm_changeauth.c +.elif ${PROG} == "tpm_setpresence" +SRCS=tpm_present.c +.elif ${PROG} == "tpm_setactive" +SRCS=tpm_activate.c +.elif ${PROG:Mtpm_set*} != "" +SRCS=${PROG:S/set//}.c +.endif + +LIBTPMUTILSOBJDIR!= cd ${.CURDIR}/../../lib/libtpm_utils && ${PRINTOBJDIR} + +.if ${PROG} == "tpm_unsealdata" +DPADD+=${LIBTPM_UNSEAL} +LDADD+=-ltpm_unseal +.endif +DPADD+=${LIBTSPI} +LDADD+=-L${LIBTPMUTILSOBJDIR} -ltpm_utils -ltspi + +.if ${PROG} != "tpm_version" && ${PROG:M*sealdata} == "" +BINDIR=/usr/sbin +.if ${PROG} != "tpm_restrictsrk" +.SUFFIXES: .8 +.PATH.8: ${DIST}/man/man8 +MAN+=${PROG}.8 +.else +NOMAN=yes +MAN= +#MLINKS+=tpm_restrictpubek.8 tpm_restrictsrk.8 +.endif +.else +BINDIR=/usr/bin +.if ${PROG} != "tpm_unsealdata" +.SUFFIXES: .1 +.PATH.1: ${DIST}/man/man1 +MAN+=${PROG}.1 +.else +NOMAN=yes +MAN= +.endif +.endif + +.include diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_changeownerauth/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_changeownerauth/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_changeownerauth/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_clear/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_clear/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_clear/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_createek/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_createek/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_createek/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_getpubek/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_getpubek/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_getpubek/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_nvdefine/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_nvdefine/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_nvdefine/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_nvinfo/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_nvinfo/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_nvinfo/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_nvread/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_nvread/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_nvread/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_nvrelease/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_nvrelease/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_nvrelease/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_nvwrite/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_nvwrite/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_nvwrite/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_resetdalock/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_resetdalock/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_resetdalock/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_restrictpubek/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_restrictpubek/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_restrictpubek/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_restrictsrk/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_restrictsrk/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_restrictsrk/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_revokeek/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_revokeek/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_revokeek/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_sealdata/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_sealdata/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_sealdata/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_selftest/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_selftest/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_selftest/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_setactive/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_setactive/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_setactive/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_setclearable/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_setclearable/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_setclearable/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_setenable/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_setenable/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_setenable/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_setoperatorauth/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_setoperatorauth/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_setoperatorauth/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_setownable/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_setownable/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_setownable/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_setpresence/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_setpresence/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_setpresence/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_takeownership/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_takeownership/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_takeownership/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_unsealdata/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_unsealdata/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_unsealdata/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/bin/tpm_version/Makefile b/crypto/external/cpl/tpm-tools/bin/tpm_version/Makefile new file mode 100644 index 000000000000..e2eb90f45ef2 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/bin/tpm_version/Makefile @@ -0,0 +1 @@ +.include "../Makefile.prog" diff --git a/crypto/external/cpl/tpm-tools/lib/Makefile b/crypto/external/cpl/tpm-tools/lib/Makefile new file mode 100644 index 000000000000..27f87851f473 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/lib/Makefile @@ -0,0 +1,3 @@ +# $NetBSD: Makefile,v 1.1 2012/01/28 16:04:15 christos Exp $ +SUBDIR = libtpm_utils libtpm_unseal +.include diff --git a/crypto/external/cpl/tpm-tools/lib/Makefile.inc b/crypto/external/cpl/tpm-tools/lib/Makefile.inc new file mode 100644 index 000000000000..e633cad88e0a --- /dev/null +++ b/crypto/external/cpl/tpm-tools/lib/Makefile.inc @@ -0,0 +1,2 @@ +# $NetBSD: Makefile.inc,v 1.1 2012/01/28 16:04:15 christos Exp $ +.include "../Makefile.inc" diff --git a/crypto/external/cpl/tpm-tools/lib/libtpm_unseal/Makefile b/crypto/external/cpl/tpm-tools/lib/libtpm_unseal/Makefile new file mode 100644 index 000000000000..b4b89d2f83b9 --- /dev/null +++ b/crypto/external/cpl/tpm-tools/lib/libtpm_unseal/Makefile @@ -0,0 +1,16 @@ +# $NetBSD: Makefile,v 1.1 2012/01/28 16:04:15 christos Exp $ +.include "../Makefile.inc" + +.PATH.c: ${DIST}/lib + +LIB=tpm_unseal +SRCS= \ +tpm_unseal.c + +SHLIB_MAJOR=1 +SHLIB_MINOR=0 + +LDADD+=-ltspi +DPADD+=${LIBTSPI} + +.include diff --git a/crypto/external/cpl/tpm-tools/lib/libtpm_utils/Makefile b/crypto/external/cpl/tpm-tools/lib/libtpm_utils/Makefile new file mode 100644 index 000000000000..41ddeb7eaf3f --- /dev/null +++ b/crypto/external/cpl/tpm-tools/lib/libtpm_utils/Makefile @@ -0,0 +1,15 @@ +# $NetBSD: Makefile,v 1.1 2012/01/28 16:04:15 christos Exp $ + +LIBISPRIVATE=yes + +.include "../Makefile.inc" + +.PATH.c: ${DIST}/lib + +LIB=tpm_utils +SRCS= \ +tpm_log.c \ +tpm_tspi.c \ +tpm_utils.c + +.include