From owner-svn-ports-head@freebsd.org Sun Mar 3 04:18:34 2019 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 212481522A37; Sun, 3 Mar 2019 04:18:34 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB79B6D495; Sun, 3 Mar 2019 04:18:33 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE4FCF672; Sun, 3 Mar 2019 04:18:33 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x234IXrt050586; Sun, 3 Mar 2019 04:18:33 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x234IVrg050574; Sun, 3 Mar 2019 04:18:31 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201903030418.x234IVrg050574@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sun, 3 Mar 2019 04:18:31 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r494475 - in head/security/tpm-tools: . files X-SVN-Group: ports-head X-SVN-Commit-Author: hrs X-SVN-Commit-Paths: in head/security/tpm-tools: . files X-SVN-Commit-Revision: 494475 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: BB79B6D495 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.96)[-0.963,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Mar 2019 04:18:34 -0000 Author: hrs Date: Sun Mar 3 04:18:31 2019 New Revision: 494475 URL: https://svnweb.freebsd.org/changeset/ports/494475 Log: Update to 1.3.9.1 and add patches to support OpenSSL 1.0.x and OpenSSL 1.1.x. Added: head/security/tpm-tools/files/patch-src-data_mgmt-data_import.c (contents, props changed) Deleted: head/security/tpm-tools/files/patch-lib-Makefile.in head/security/tpm-tools/files/patch-src-cmds-Makefile.am head/security/tpm-tools/files/patch-src-cmds-Makefile.in head/security/tpm-tools/files/patch-src-data_mgmt-Makefile.in Modified: head/security/tpm-tools/Makefile head/security/tpm-tools/distinfo head/security/tpm-tools/files/patch-lib-Makefile.am head/security/tpm-tools/files/patch-lib-tpm_utils.c head/security/tpm-tools/files/patch-src-data_mgmt-Makefile.am head/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_nvcommon.c head/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_nvwrite.c head/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_present.c Modified: head/security/tpm-tools/Makefile ============================================================================== --- head/security/tpm-tools/Makefile Sun Mar 3 03:47:33 2019 (r494474) +++ head/security/tpm-tools/Makefile Sun Mar 3 04:18:31 2019 (r494475) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= tpm-tools -PORTVERSION= 1.3.8 +PORTVERSION= 1.3.9.1 CATEGORIES= security MASTER_SITES= SF/trousers/${PORTNAME}/${PORTVERSION} @@ -15,12 +15,14 @@ LICENSE_FILE= ${WRKSRC}/LICENSE LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept LIB_DEPENDS= libtspi.so:security/trousers -BUILD_DEPENDS= pkcsconf:security/opencryptoki +BUILD_DEPENDS= ${LOCALBASE}/sbin/pkcsconf:security/opencryptoki RUN_DEPENDS= ${LOCALBASE}/sbin/tcsd:security/trousers \ ${LOCALBASE}/lib/pkcs11/libopencryptoki.so:security/opencryptoki -USES= gettext gmake iconv libtool +USES= autoreconf gettext gmake iconv libtool ssl USE_LDCONFIG= YES + +NO_WRKSUBDIR= YES GNU_CONFIGURE= YES LIBS+= -L${LOCALBASE}/lib -lintl INSTALL_TARGET= install-strip Modified: head/security/tpm-tools/distinfo ============================================================================== --- head/security/tpm-tools/distinfo Sun Mar 3 03:47:33 2019 (r494474) +++ head/security/tpm-tools/distinfo Sun Mar 3 04:18:31 2019 (r494475) @@ -1,3 +1,3 @@ -TIMESTAMP = 1463578786 -SHA256 (tpm-tools-1.3.8.tar.gz) = 66eb4ff095542403db6b4bd4b574e8a5c08084fe4e9e5aa9a829ee84e20bea83 -SIZE (tpm-tools-1.3.8.tar.gz) = 473339 +TIMESTAMP = 1551571411 +SHA256 (tpm-tools-1.3.9.1.tar.gz) = 9cb714e2650826e2e932f65bc0ba9d61b927dc5fea47f2c2a2b64f0fdfcbfa68 +SIZE (tpm-tools-1.3.9.1.tar.gz) = 482859 Modified: head/security/tpm-tools/files/patch-lib-Makefile.am ============================================================================== --- head/security/tpm-tools/files/patch-lib-Makefile.am Sun Mar 3 03:47:33 2019 (r494474) +++ head/security/tpm-tools/files/patch-lib-Makefile.am Sun Mar 3 04:18:31 2019 (r494475) @@ -1,11 +1,11 @@ ---- lib/Makefile.am.orig 2012-05-17 17:50:39 UTC +--- lib/Makefile.am.orig 2017-02-21 02:23:56 UTC +++ lib/Makefile.am @@ -44,7 +44,7 @@ libtpm_utils_la_SOURCES = tpm_utils.c \ # # TSPI interface library libtpm_tspi_la_SOURCES = tpm_tspi.c --libtpm_tspi_la_LIBADD = libtpm_utils.la -ldl -+libtpm_tspi_la_LIBADD = libtpm_utils.la +-libtpm_tspi_la_LIBADD = libtpm_utils.la -ldl @INTLLIBS@ ++libtpm_tspi_la_LIBADD = libtpm_utils.la @INTLLIBS@ # # PKCS#11 interface library Modified: head/security/tpm-tools/files/patch-lib-tpm_utils.c ============================================================================== --- head/security/tpm-tools/files/patch-lib-tpm_utils.c Sun Mar 3 03:47:33 2019 (r494474) +++ head/security/tpm-tools/files/patch-lib-tpm_utils.c Sun Mar 3 04:18:31 2019 (r494475) @@ -1,6 +1,6 @@ ---- lib/tpm_utils.c.orig 2010-09-30 17:28:09 UTC +--- lib/tpm_utils.c.orig 2017-02-21 01:23:56 UTC +++ lib/tpm_utils.c -@@ -55,6 +55,7 @@ genericOptHandler( int a_iNumArgs, char +@@ -55,6 +55,7 @@ genericOptHandler( int a_iNumArgs, char **a_pszArgs, CmdHelpFunction tCmdHelp = ( a_tCmdHelpFunction ) ? a_tCmdHelpFunction : logCmdHelp; @@ -8,39 +8,38 @@ char szShortOpts[strlen( pszGenShortOpts ) + ( ( a_pszShortOpts == NULL ) ? 0 : strlen( a_pszShortOpts ) ) + 1]; -@@ -64,12 +65,36 @@ genericOptHandler( int a_iNumArgs, char +@@ -64,12 +65,35 @@ genericOptHandler( int a_iNumArgs, char **a_pszArgs, int iOpt; int rc; +#else + int iOpt; + int rc; -+ + + char *szShortOpts; + int iNumShortOpts, iNumGenLongOpts; + struct option *sLongOpts; + + iNumShortOpts = strlen( pszGenShortOpts ) + -+ ( ( a_pszShortOpts == NULL ) ? 0 : strlen( a_pszShortOpts ) ); ++ ( ( a_pszShortOpts == NULL ) ? 0 : strlen( a_pszShortOpts ) ); + iNumGenLongOpts = sizeof( sGenLongOpts ) / sizeof( struct option ); + + szShortOpts = malloc(iNumShortOpts + 1); -+ sLongOpts = malloc((iNumGenLongOpts + a_iNumOpts + 1) -+ * sizeof(struct option)); ++ sLongOpts = malloc((iNumGenLongOpts + a_iNumOpts + 1) ++ * sizeof(struct option)); + if( (szShortOpts == NULL) || (sLongOpts == NULL) ) { + perror("malloc"); + return -1; + } +#endif - strcpy( szShortOpts, pszGenShortOpts); if ( a_pszShortOpts ) strcat( szShortOpts, a_pszShortOpts ); +#ifdef __GCC - memset( sLongOpts, 0, sizeof( sLongOpts ) ); + __memset( sLongOpts, 0, sizeof( sLongOpts ) ); +#else -+ memset( sLongOpts, 0, (iNumGenLongOpts + a_iNumOpts + 1) * sizeof(struct option)); ++ __memset( sLongOpts, 0, (iNumGenLongOpts + a_iNumOpts + 1) * sizeof(struct option)); +#endif memcpy( sLongOpts, sGenLongOpts, sizeof( sGenLongOpts ) ); if ( a_sLongOpts ) { Modified: head/security/tpm-tools/files/patch-src-data_mgmt-Makefile.am ============================================================================== --- head/security/tpm-tools/files/patch-src-data_mgmt-Makefile.am Sun Mar 3 03:47:33 2019 (r494474) +++ head/security/tpm-tools/files/patch-src-data_mgmt-Makefile.am Sun Mar 3 04:18:31 2019 (r494475) @@ -1,11 +1,11 @@ ---- src/data_mgmt/Makefile.am.orig 2012-05-17 17:50:29 UTC +--- src/data_mgmt/Makefile.am.orig 2017-02-21 01:23:57 UTC +++ src/data_mgmt/Makefile.am @@ -38,7 +38,7 @@ noinst_HEADERS = data_common.h \ # Common build flags AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX --LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi -ldl -+LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi +-LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi -ldl @INTLLIBS@ ++LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi @INTLLIBS@ # Added: head/security/tpm-tools/files/patch-src-data_mgmt-data_import.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/tpm-tools/files/patch-src-data_mgmt-data_import.c Sun Mar 3 04:18:31 2019 (r494475) @@ -0,0 +1,79 @@ +--- src/data_mgmt/data_import.c.orig 2017-02-21 02:12:00 UTC ++++ src/data_mgmt/data_import.c +@@ -372,7 +372,7 @@ readX509Cert( const char *a_pszFile, + goto out; + } + +- if ( EVP_PKEY_type( pKey->type ) != EVP_PKEY_RSA ) { ++ if ( EVP_PKEY_type( EVP_PKEY_id(pKey) ) != EVP_PKEY_RSA ) { + logError( TOKEN_RSA_KEY_ERROR ); + + X509_free( pX509 ); +@@ -691,8 +691,8 @@ createRsaPubKeyObject( RSA *a_pRsa, + + int rc = -1; + +- int nLen = BN_num_bytes( a_pRsa->n ); +- int eLen = BN_num_bytes( a_pRsa->e ); ++ int nLen = BN_num_bytes( RSA_get0_n(a_pRsa) ); ++ int eLen = BN_num_bytes( RSA_get0_e(a_pRsa) ); + + CK_RV rv; + +@@ -732,8 +732,8 @@ createRsaPubKeyObject( RSA *a_pRsa, + } + + // Get binary representations of the RSA key information +- BN_bn2bin( a_pRsa->n, n ); +- BN_bn2bin( a_pRsa->e, e ); ++ BN_bn2bin( RSA_get0_n(a_pRsa), n ); ++ BN_bn2bin( RSA_get0_e(a_pRsa), e ); + + // Create the RSA public key object + rv = createObject( a_hSession, tAttr, ulAttrCount, a_hObject ); +@@ -760,14 +760,14 @@ createRsaPrivKeyObject( RSA *a_pRsa, + + int rc = -1; + +- int nLen = BN_num_bytes( a_pRsa->n ); +- int eLen = BN_num_bytes( a_pRsa->e ); +- int dLen = BN_num_bytes( a_pRsa->d ); +- int pLen = BN_num_bytes( a_pRsa->p ); +- int qLen = BN_num_bytes( a_pRsa->q ); +- int dmp1Len = BN_num_bytes( a_pRsa->dmp1 ); +- int dmq1Len = BN_num_bytes( a_pRsa->dmq1 ); +- int iqmpLen = BN_num_bytes( a_pRsa->iqmp ); ++ int nLen = BN_num_bytes( RSA_get0_n(a_pRsa) ); ++ int eLen = BN_num_bytes( RSA_get0_e(a_pRsa) ); ++ int dLen = BN_num_bytes( RSA_get0_d(a_pRsa) ); ++ int pLen = BN_num_bytes( RSA_get0_p(a_pRsa) ); ++ int qLen = BN_num_bytes( RSA_get0_q(a_pRsa) ); ++ int dmp1Len = BN_num_bytes( RSA_get0_dmp1(a_pRsa) ); ++ int dmq1Len = BN_num_bytes( RSA_get0_dmq1(a_pRsa) ); ++ int iqmpLen = BN_num_bytes( RSA_get0_iqmp(a_pRsa) ); + + CK_RV rv; + +@@ -821,14 +821,14 @@ createRsaPrivKeyObject( RSA *a_pRsa, + } + + // Get binary representations of the RSA key information +- BN_bn2bin( a_pRsa->n, n ); +- BN_bn2bin( a_pRsa->e, e ); +- BN_bn2bin( a_pRsa->d, d ); +- BN_bn2bin( a_pRsa->p, p ); +- BN_bn2bin( a_pRsa->q, q ); +- BN_bn2bin( a_pRsa->dmp1, dmp1 ); +- BN_bn2bin( a_pRsa->dmq1, dmq1 ); +- BN_bn2bin( a_pRsa->iqmp, iqmp ); ++ BN_bn2bin( RSA_get0_n(a_pRsa), n ); ++ BN_bn2bin( RSA_get0_e(a_pRsa), e ); ++ BN_bn2bin( RSA_get0_d(a_pRsa), d ); ++ BN_bn2bin( RSA_get0_p(a_pRsa), p ); ++ BN_bn2bin( RSA_get0_q(a_pRsa), q ); ++ BN_bn2bin( RSA_get0_dmp1(a_pRsa), dmp1 ); ++ BN_bn2bin( RSA_get0_dmq1(a_pRsa), dmq1 ); ++ BN_bn2bin( RSA_get0_iqmp(a_pRsa), iqmp ); + + // Create the RSA private key object + rv = createObject( a_hSession, tAttr, ulAttrCount, a_hObject ); Modified: head/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_nvcommon.c ============================================================================== --- head/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_nvcommon.c Sun Mar 3 03:47:33 2019 (r494474) +++ head/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_nvcommon.c Sun Mar 3 04:18:31 2019 (r494475) @@ -1,17 +1,17 @@ ---- src/tpm_mgmt/tpm_nvcommon.c.orig 2011-08-17 12:20:35 UTC +--- src/tpm_mgmt/tpm_nvcommon.c.orig 2017-02-21 01:23:57 UTC +++ src/tpm_mgmt/tpm_nvcommon.c -@@ -140,8 +140,8 @@ int parseStringWithValues(const char *aA +@@ -140,8 +140,8 @@ int parseStringWithValues(const char *aArg, aArg); return -1; } -- if (!aArg[offset+numbytes] == '|' && -- !aArg[offset+numbytes] == 0) { -+ if (aArg[offset+numbytes] != '|' && +- if (aArg[offset+numbytes] == '|' || +- aArg[offset+numbytes] == 0) { ++ if (aArg[offset+numbytes] != '|' || + aArg[offset+numbytes] != 0) { logError(_("Illegal character following " "hexadecimal number in %s\n"), aArg + offset); -@@ -164,8 +164,8 @@ int parseStringWithValues(const char *aA +@@ -164,8 +164,8 @@ int parseStringWithValues(const char *aArg, return -1; } Modified: head/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_nvwrite.c ============================================================================== --- head/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_nvwrite.c Sun Mar 3 03:47:33 2019 (r494474) +++ head/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_nvwrite.c Sun Mar 3 04:18:31 2019 (r494475) @@ -1,4 +1,4 @@ ---- src/tpm_mgmt/tpm_nvwrite.c.orig 2011-08-17 12:20:35 UTC +--- src/tpm_mgmt/tpm_nvwrite.c.orig 2017-02-21 01:23:57 UTC +++ src/tpm_mgmt/tpm_nvwrite.c @@ -33,6 +33,7 @@ static BOOL nvindex_set; static unsigned int nvindex; @@ -8,7 +8,7 @@ static int fillvalue = -1; static const char *filename; static BOOL passWellKnown; -@@ -60,6 +61,7 @@ static int parse(const int aOpt, const c +@@ -60,6 +61,7 @@ static int parse(const int aOpt, const char *aArg) if (parseHexOrDecimal(aArg, &length, 0, UINT_MAX, "length of data") != 0) return -1; Modified: head/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_present.c ============================================================================== --- head/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_present.c Sun Mar 3 03:47:33 2019 (r494474) +++ head/security/tpm-tools/files/patch-src-tpm_mgmt-tpm_present.c Sun Mar 3 04:18:31 2019 (r494475) @@ -1,6 +1,6 @@ ---- src/tpm_mgmt/tpm_present.c.orig 2012-05-17 17:49:58 UTC +--- src/tpm_mgmt/tpm_present.c.orig 2017-02-21 01:23:57 UTC +++ src/tpm_mgmt/tpm_present.c -@@ -168,9 +168,10 @@ static BOOL confirmLifeLock(TSS_HCONTEXT +@@ -168,9 +168,10 @@ static BOOL confirmLifeLock(TSS_HCONTEXT hContext, TSS TSS_HPOLICY hTpmPolicy; char *pwd = NULL; int pswd_len;