From ac0ba5fd1dcf4f64c794f44001fb05a4c9d9dbaea1552322728990098971b64d Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 1 Mar 2017 16:18:06 +0000 Subject: [PATCH] Accepting request 461444 from home:msmeissn:branches:security - Updated to 1.1.0 / 016-11-04 - Added * travis ci support. * Allow for unit tests to be enabled selectively. * tpm2_rc_decode tool: Decode TPM_RC error codes. * Android Make file * tpm2_listpersistent: list all persistent objects * test scripts for tpm2-tools * tpm2_nvreadlock * tpm2_getmanufec: retrieve EC from tpm manufacturer server. * Copy 'common' and 'sample' code from the TPM2.0-TSS repo. - Modified * tpm2_takeownership: update option -c to use lockout password to clear. * tpm2_listpcrs: add options -L and -s, rewrite to increase performance. * tpm2_quote: added -L option to support selection of multiple banks. * tpm2_quote: add -q option to get qualifying data. * configure: Use pkg-config to get info about libcurl and libcrypto. * configure: Use pkg-config to locate SAPI and TCTI headers / libraries. * tpm2_x: Add -X option to enable password input in Hex format. * tpm2_nvdefine: Change -X option to -I. * tpm2-nvwrite: fix for unable to write 1024B+ data. * tpm2_getmanufec: Fix base64 encoding. * tpm2_x: fixed a lot of TPM2B failures caused by wrong initialization. * tpm2_getmanufec: let configure handle libs. * tpm2_getmanufec: Convert from dos to unix format. * build: Check for TSS2 library @ configure time. * build: Detect required TSS2 and TCTI headers. * build: Use libtool to build the common library * build: Install all binaries into sbin. * build: Build common sources into library. OBS-URL: https://build.opensuse.org/request/show/461444 OBS-URL: https://build.opensuse.org/package/show/security/tpm2.0-tools?expand=0&rev=11 --- 1.0-alpha_0.zip | 3 --- fixes.patch | 25 +++++++++++++++++++ tpm2-install-binaries.patch | 13 ---------- tpm2.0-tools.changes | 50 +++++++++++++++++++++++++++++++++++++ tpm2.0-tools.spec | 24 ++++++------------ v1.0.1.zip | 3 --- v1.1.0.zip | 3 +++ 7 files changed, 85 insertions(+), 36 deletions(-) delete mode 100644 1.0-alpha_0.zip create mode 100644 fixes.patch delete mode 100644 tpm2-install-binaries.patch delete mode 100644 v1.0.1.zip create mode 100644 v1.1.0.zip diff --git a/1.0-alpha_0.zip b/1.0-alpha_0.zip deleted file mode 100644 index f6e17af..0000000 --- a/1.0-alpha_0.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b0ccb7095ac77f25b32a788cf114d5e7b23b85acaf1b7624dd259dfa95570e31 -size 3043469 diff --git a/fixes.patch b/fixes.patch new file mode 100644 index 0000000..5523412 --- /dev/null +++ b/fixes.patch @@ -0,0 +1,25 @@ +Index: tpm2.0-tools-1.1.0/src/tpm2_listpcrs.cpp +=================================================================== +--- tpm2.0-tools-1.1.0.orig/src/tpm2_listpcrs.cpp ++++ tpm2.0-tools-1.1.0/src/tpm2_listpcrs.cpp +@@ -159,7 +159,7 @@ int readPcrValues() + return 0; + } + +-int preparePcrSelections_g(TPMI_ALG_HASH algId) ++void preparePcrSelections_g(TPMI_ALG_HASH algId) + { + UINT32 pcrId = 0; + +Index: tpm2.0-tools-1.1.0/src/tpm2_rc_decode.c +=================================================================== +--- tpm2.0-tools-1.1.0.orig/src/tpm2_rc_decode.c ++++ tpm2.0-tools-1.1.0/src/tpm2_rc_decode.c +@@ -246,6 +246,7 @@ print_tpm_rc_tpm_error_code (TPM_RC rc) + fprintf (stderr, "Unknown TPM_RC format\n"); + return -1; + } ++ return 0; + } + /* Top level function to dump human readable data about TPM_RCs. + */ diff --git a/tpm2-install-binaries.patch b/tpm2-install-binaries.patch deleted file mode 100644 index 6825917..0000000 --- a/tpm2-install-binaries.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: tpm2.0-tools-1.0.1/sapi-tools/Makefile.am -=================================================================== ---- tpm2.0-tools-1.0.1.orig/sapi-tools/Makefile.am -+++ tpm2.0-tools-1.0.1/sapi-tools/Makefile.am -@@ -91,7 +91,7 @@ LIBTPM = ../tss/sysapi/libtpm.a - $(LIBTPM): - $(MAKE) -C ../tss/ - --noinst_PROGRAMS = tpm2_listpcrs \ -+sbin_PROGRAMS = tpm2_listpcrs \ - tpm2_quote \ - tpm2_takeownership \ - tpm2_getpubek \ diff --git a/tpm2.0-tools.changes b/tpm2.0-tools.changes index 4a70b00..c30084d 100644 --- a/tpm2.0-tools.changes +++ b/tpm2.0-tools.changes @@ -1,3 +1,53 @@ +------------------------------------------------------------------- +Wed Mar 1 15:33:46 UTC 2017 - meissner@suse.com + +- Updated to 1.1.0 / 016-11-04 + - Added + * travis ci support. + * Allow for unit tests to be enabled selectively. + * tpm2_rc_decode tool: Decode TPM_RC error codes. + * Android Make file + * tpm2_listpersistent: list all persistent objects + * test scripts for tpm2-tools + * tpm2_nvreadlock + * tpm2_getmanufec: retrieve EC from tpm manufacturer server. + * Copy 'common' and 'sample' code from the TPM2.0-TSS repo. + + - Modified + * tpm2_takeownership: update option -c to use lockout password to clear. + * tpm2_listpcrs: add options -L and -s, rewrite to increase performance. + * tpm2_quote: added -L option to support selection of multiple banks. + * tpm2_quote: add -q option to get qualifying data. + * configure: Use pkg-config to get info about libcurl and libcrypto. + * configure: Use pkg-config to locate SAPI and TCTI headers / libraries. + * tpm2_x: Add -X option to enable password input in Hex format. + * tpm2_nvdefine: Change -X option to -I. + * tpm2-nvwrite: fix for unable to write 1024B+ data. + * tpm2_getmanufec: Fix base64 encoding. + * tpm2_x: fixed a lot of TPM2B failures caused by wrong initialization. + * tpm2_getmanufec: let configure handle libs. + * tpm2_getmanufec: Convert from dos to unix format. + * build: Check for TSS2 library @ configure time. + * build: Detect required TSS2 and TCTI headers. + * build: Use libtool to build the common library + * build: Install all binaries into sbin. + * build: Build common sources into library. + * build: Move all source files to 'src'. + * Makefile.am: Move all build rules into single Makefile.am. + * everything: Use new TCTI headers and fixup API calls. + * everything: Update source to cope with sapi header cleanup. + * tpm2_activatecredential: Updated to support TCG compatible EK + * tpm2_getpubak: Updated to use TCG compatible EK + * tpm2_getpubek: fix ek creation to follow TCG EK profile spec. + + - Removed + * Windows related code + * depenedency on the TPM2.0-TSS repo source code + +- 1.0-alpha_0.zip: removed, use tpm2-0-tss directly. +- tpm2-install-binaries.patch: not needed anymore. +- fixes.patch: fixed random return build errors. + ------------------------------------------------------------------- Mon Aug 22 12:02:01 UTC 2016 - meissner@suse.com diff --git a/tpm2.0-tools.spec b/tpm2.0-tools.spec index 66f434d..8a9d73e 100644 --- a/tpm2.0-tools.spec +++ b/tpm2.0-tools.spec @@ -1,7 +1,7 @@ # # spec file for package tpm2.0-tools # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,20 +17,21 @@ Name: tpm2.0-tools -Version: 1.0.1 +Version: 1.1.0 Release: 0 Summary: Trusted Platform Module (TPM) 2.0 administration tools License: BSD-3-Clause Group: Productivity/Security -Url: http://trousers.sourceforge.net/ +Url: https://github.com/01org/tpm2.0-tools Source0: https://github.com/01org/tpm2.0-tools/archive/v%{version}.zip -# https://github.com/01org/TPM2.0-TSS ... -Source1: https://github.com/01org/TPM2.0-TSS/archive/1.0-alpha_0.zip -Patch0: tpm2-install-binaries.patch +Patch0: fixes.patch BuildRequires: autoconf-archive BuildRequires: automake BuildRequires: gcc-c++ +BuildRequires: libcurl-devel +BuildRequires: libopenssl-devel BuildRequires: libtool +BuildRequires: tpm2-0-tss-devel BuildRequires: unzip BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -45,19 +46,8 @@ associated interfaces. %setup -q %patch0 -p1 -# embedded tss copy for now -unzip %{SOURCE1} -mv TPM2.0-TSS-1.0-alpha_0 tss - %build -cd tss bash ./bootstrap -CFLAGS="$RPM_OPT_FLAGS" ./configure -make %{?_smp_mflags} -cd .. -aclocal -autoconf -automake --add-missing %configure --disable-static make %{?_smp_mflags} diff --git a/v1.0.1.zip b/v1.0.1.zip deleted file mode 100644 index 9098ae6..0000000 --- a/v1.0.1.zip +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:585aba857ec22eef88db021f86d78d311705c468ca7af81b10e89c341eb2d4e1 -size 123400 diff --git a/v1.1.0.zip b/v1.1.0.zip new file mode 100644 index 0000000..60b02ba --- /dev/null +++ b/v1.1.0.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8410472b4166035beba9eedc54c7f499666aee1d0258706eb0c9ddf7052e0dbb +size 251778