aboutsummaryrefslogtreecommitdiff
path: root/security/tpm-tools
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2013-07-25 10:49:53 +0000
committerHiroki Sato <hrs@FreeBSD.org>2013-07-25 10:49:53 +0000
commit3326a8cc13b868fabaf0c38a720b1bf69794fbc6 (patch)
treec08f9fc2029348d360f35885dabe955a7ec38921 /security/tpm-tools
parent8525495496296c92599a10938e57a5f4c565a14d (diff)
downloadports-3326a8cc13b868fabaf0c38a720b1bf69794fbc6.tar.gz
ports-3326a8cc13b868fabaf0c38a720b1bf69794fbc6.zip
- Fix build on -CURRENT.
- Take maintainership.
Notes
Notes: svn path=/head/; revision=323634
Diffstat (limited to 'security/tpm-tools')
-rw-r--r--security/tpm-tools/Makefile27
-rw-r--r--security/tpm-tools/files/patch-lib-tpm_utils.c14
-rw-r--r--security/tpm-tools/files/patch-src-data_mgmt-data_protect.c10
-rw-r--r--security/tpm-tools/files/patch-src-tpm_mgmt-tpm_present.c7
-rw-r--r--security/tpm-tools/files/patch-src-tpm_mgmt-tpm_takeownership.c10
-rw-r--r--security/tpm-tools/pkg-plist1
6 files changed, 49 insertions, 20 deletions
diff --git a/security/tpm-tools/Makefile b/security/tpm-tools/Makefile
index 93b7b8657f66..168cba96f760 100644
--- a/security/tpm-tools/Makefile
+++ b/security/tpm-tools/Makefile
@@ -1,9 +1,5 @@
-# New ports collection makefile for: tpm-tools
-# Date created: 18 Sep 2007
-# Whom: Sebastian Schuetz <sschuetz@fhm.edu>
-#
+# Created by: Sebastian Schuetz <sschuetz@fhm.edu>
# $FreeBSD$
-#
PORTNAME= tpm-tools
PORTVERSION= 1.3.5
@@ -11,27 +7,26 @@ PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= SF/trousers/${PORTNAME}/${PORTVERSION}
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= hrs@FreeBSD.org
COMMENT= Provides a basic set of TPM tools
-LIB_DEPENDS= tspi.2:${PORTSDIR}/security/trousers
+LICENSE= CPL
+LICENSE_NAME= Common Public License
+LICENSE_FILE= ${WRKSRC}/LICENSE
+LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
+
+LIB_DEPENDS= tspi:${PORTSDIR}/security/trousers
BUILD_DEPENDS= pkcsconf:${PORTSDIR}/security/opencryptoki
-RUN_DEPENDS= ${LOCALBASE}/sbin/tcsd:${PORTSDIR}/security/trousers
-RUN_DEPENDS+= ${LOCALBASE}/lib/pkcs11/libopencryptoki.so:${PORTSDIR}/security/opencryptoki
+RUN_DEPENDS= ${LOCALBASE}/sbin/tcsd:${PORTSDIR}/security/trousers \
+ ${LOCALBASE}/lib/pkcs11/libopencryptoki.so:${PORTSDIR}/security/opencryptoki
-USE_GMAKE= YES
-USES= gettext iconv
+USES= gettext gmake iconv
USE_LDCONFIG= YES
USE_AUTOTOOLS= autoconf
GNU_CONFIGURE= YES
LDFLAGS+= -L${LOCALBASE}/lib -lintl -liconv
MAKE_JOBS_SAFE= YES
-LICENSE= CPL
-LICENSE_NAME= Common Public License
-LICENSE_FILE= ${WRKSRC}/LICENSE
-LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
-
MAN1= tpm_sealdata.1 tpm_version.1 \
tpmtoken_import.1 tpmtoken_init.1 tpmtoken_objects.1 \
tpmtoken_protect.1 tpmtoken_setpasswd.1
diff --git a/security/tpm-tools/files/patch-lib-tpm_utils.c b/security/tpm-tools/files/patch-lib-tpm_utils.c
index 37ba761c5f74..944a9d7190c6 100644
--- a/security/tpm-tools/files/patch-lib-tpm_utils.c
+++ b/security/tpm-tools/files/patch-lib-tpm_utils.c
@@ -1,5 +1,5 @@
--- lib/tpm_utils.c.orig 2010-02-02 02:17:23.000000000 +0900
-+++ lib/tpm_utils.c 2010-10-25 01:55:31.065559348 +0900
++++ lib/tpm_utils.c 2013-07-24 22:00:15.000000000 +0900
@@ -55,6 +55,7 @@
CmdHelpFunction tCmdHelp = ( a_tCmdHelpFunction ) ? a_tCmdHelpFunction
: logCmdHelp;
@@ -8,7 +8,7 @@
char szShortOpts[strlen( pszGenShortOpts )
+ ( ( a_pszShortOpts == NULL ) ? 0 : strlen( a_pszShortOpts ) )
+ 1];
-@@ -64,6 +65,26 @@
+@@ -64,12 +65,36 @@
int iOpt;
int rc;
@@ -35,3 +35,13 @@
strcpy( szShortOpts, pszGenShortOpts);
if ( a_pszShortOpts )
+ strcat( szShortOpts, a_pszShortOpts );
+
++#ifdef __GCC
+ memset( sLongOpts, 0, sizeof( sLongOpts ) );
++#else
++ memset( sLongOpts, 0, (iNumGenLongOpts + a_iNumOpts + 1) * sizeof(struct option));
++#endif
+ memcpy( sLongOpts, sGenLongOpts, sizeof( sGenLongOpts ) );
+ if ( a_sLongOpts ) {
+ memcpy( sLongOpts + iNumGenLongOpts,
diff --git a/security/tpm-tools/files/patch-src-data_mgmt-data_protect.c b/security/tpm-tools/files/patch-src-data_mgmt-data_protect.c
new file mode 100644
index 000000000000..5e6c765dbae9
--- /dev/null
+++ b/security/tpm-tools/files/patch-src-data_mgmt-data_protect.c
@@ -0,0 +1,10 @@
+--- src/data_mgmt/data_protect.c.orig 2013-07-24 22:04:32.000000000 +0900
++++ src/data_mgmt/data_protect.c 2013-07-24 22:04:59.000000000 +0900
+@@ -425,6 +425,7 @@
+ CK_OBJECT_HANDLE hObject;
+ CK_MECHANISM tMechanism = { CKM_AES_ECB, NULL, 0 };
+
++ memset(&hSession, 0, sizeof(hSession));
+ // Set up i18n
+ initIntlSys( );
+
diff --git a/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_present.c b/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_present.c
index c739ad69a125..a458d50c3422 100644
--- a/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_present.c
+++ b/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_present.c
@@ -1,6 +1,6 @@
--- src/tpm_mgmt/tpm_present.c.orig 2009-08-20 23:46:31.000000000 +0900
-+++ src/tpm_mgmt/tpm_present.c 2010-10-25 01:55:31.071556276 +0900
-@@ -168,7 +168,7 @@
++++ src/tpm_mgmt/tpm_present.c 2013-07-24 22:02:07.000000000 +0900
+@@ -168,9 +168,10 @@
TSS_HPOLICY hTpmPolicy;
char *pwd = NULL;
int pswd_len;
@@ -8,4 +8,7 @@
+ char rsp[6];
int scanCount;
++ memset(&hTpmPolicy, 0, sizeof(hTpmPolicy));
//get status w/o owner auth (FAILS 1.1, should PASS 1.2)
+ if (tpmGetStatus(hTpm, flags[cmdEnable].property, &bCmd) !=
+ TSS_SUCCESS
diff --git a/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_takeownership.c b/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_takeownership.c
new file mode 100644
index 000000000000..58f619a35ed8
--- /dev/null
+++ b/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_takeownership.c
@@ -0,0 +1,10 @@
+--- src/tpm_mgmt/tpm_takeownership.c.orig 2013-07-24 22:02:59.000000000 +0900
++++ src/tpm_mgmt/tpm_takeownership.c 2013-07-24 22:03:53.000000000 +0900
+@@ -77,6 +77,7 @@
+ {"srk-well-known", no_argument, NULL, 'z'},
+ };
+
++ memset(&hSrk, 0, sizeof(hSrk));
+ initIntlSys();
+
+ if (genericOptHandler
diff --git a/security/tpm-tools/pkg-plist b/security/tpm-tools/pkg-plist
index 28ca623be2c1..3e0b4a7c6ee1 100644
--- a/security/tpm-tools/pkg-plist
+++ b/security/tpm-tools/pkg-plist
@@ -1,3 +1,4 @@
+@comment $FreeBSD$
bin/tpm_sealdata
bin/tpm_unsealdata
bin/tpmtoken_import