From aea7a2fbddfdfb7c470398290854658ff451a4b1 Mon Sep 17 00:00:00 2001 From: Yunying Sun Date: Mar 15 2019 02:43:06 +0000 Subject: Update to 3.1.4 release --- diff --git a/.gitignore b/.gitignore index 48bf808..fea1f97 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/tpm2-tools-3.1.3.tar.gz +/tpm2-tools-3.1.4.tar.gz diff --git a/options-fix-broken-T-option-when-passing-additional-.patch b/options-fix-broken-T-option-when-passing-additional-.patch deleted file mode 100644 index 0f1fbfb..0000000 --- a/options-fix-broken-T-option-when-passing-additional-.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 2565cf6c5cc7a0af7f426b7c9b03ac2f7c76005a Mon Sep 17 00:00:00 2001 -From: Javier Martinez Canillas -Date: Mon, 7 Jan 2019 11:31:50 +0100 -Subject: [PATCH] options: fix broken -T option when passing additional - arguments - -The commit 175e47711c7 ("lib/tpm2_options: restore TCTI configuration -environment variables") restored how the TCTI configuration was setup -for the 3.X releases, but this broke the -T,--tcti option since was -ignored. - -Commit 554a13f45c0 ("options: fix broken -T option") partially fixed -this, but only when additional TCTI arguments were not used. - -For example when specifying the -T device:/dev/tpmrm0 TCTI option: - -$ tpm2_pcrlist -T device:/dev/tpmrm0 -... -ERROR: Could not dlopen library: "device:/dev/tpmrm0" -ERROR: Could not load tcti, got: "device:/dev/tpmrm0" - -Signed-off-by: Javier Martinez Canillas ---- - lib/tpm2_options.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/tpm2_options.c b/lib/tpm2_options.c -index 006c46e4944..1d1093aa74d 100644 ---- a/lib/tpm2_options.c -+++ b/lib/tpm2_options.c -@@ -291,7 +291,7 @@ static tcti_conf tcti_get_config(const char *optstr) { - } - } - } else { -- conf.name = strdup(optstr); -+ parse_env_tcti(optstr, &conf); - } - - if (!conf.name) { --- -2.19.2 - diff --git a/options-fix-broken-T-option.patch b/options-fix-broken-T-option.patch deleted file mode 100644 index 04ba211..0000000 --- a/options-fix-broken-T-option.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 554a13f45c05faa388e028369492e9cc7dee5f13 Mon Sep 17 00:00:00 2001 -From: William Roberts -Date: Mon, 5 Nov 2018 11:39:02 -0800 -Subject: [PATCH] options: fix broken -T option - -commit: - - 175e47711c72 lib/tpm2_options: restore TCTI configuration environment variables - -Broke the option handling, effectively ignoring the -T/--tcti input. Honor that input -if specified and don't just run the default TCTI search unless it's not specified. - -Signed-off-by: William Roberts ---- - lib/tpm2_options.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/lib/tpm2_options.c b/lib/tpm2_options.c -index 2531948ecf7..006c46e4944 100644 ---- a/lib/tpm2_options.c -+++ b/lib/tpm2_options.c -@@ -290,6 +290,8 @@ static tcti_conf tcti_get_config(const char *optstr) { - parse_env_tcti(optstr, &conf); - } - } -+ } else { -+ conf.name = strdup(optstr); - } - - if (!conf.name) { --- -2.19.2 - diff --git a/sources b/sources index 9f2aaf0..a0560ab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (tpm2-tools-3.1.3.tar.gz) = 37edf59e47168c42ffc66e948722753334ae3e00f3e258d9e801dffd259a763a1bf4f63b3feecf7728b4dade69ca5da15d631e1a606f68e10f7d314a1a757bdc +SHA512 (tpm2-tools-3.1.4.tar.gz) = c5e1be4ffab305ee42a8b4a9c9aa4373158259a58844e273465f97a74f913fb12098b9fd81127148be95ecba7378f6a45b96af256dde3101a237e5e33e8e8ccb diff --git a/tpm2-tools.spec b/tpm2-tools.spec index 7581937..c061d9e 100644 --- a/tpm2-tools.spec +++ b/tpm2-tools.spec @@ -1,17 +1,12 @@ Name: tpm2-tools -Version: 3.1.3 -Release: 4%{?dist} +Version: 3.1.4 +Release: 1%{?dist} Summary: A TPM2.0 testing tool build upon TPM2.0-TSS License: BSD URL: https://github.com/tpm2-software/tpm2-tools Source0: https://github.com/tpm2-software/tpm2-tools/releases/download/%{version}/%{name}-%{version}.tar.gz -Patch0: tpm2_rsaencrypt-fix-example-in-man-page.patch -Patch1: tpm2_getmanufc-fix-OSSL-build-warnings.patch -Patch2: options-fix-broken-T-option.patch -Patch3: options-fix-broken-T-option-when-passing-additional-.patch - BuildRequires: gcc-c++ BuildRequires: libtool BuildRequires: autoconf-archive @@ -50,6 +45,10 @@ tpm2-tools is a batch of testing tools for tpm2.0. It is based on tpm2-tss. %{_mandir}/man1/tpm2_*.1.gz %changelog +* Fri Mar 15 2019 Yunying Sun - 3.1.4-1 +- Update to 3.1.4 release +- Removed the 4 patches since all have been included in 3.1.4 release + * Sun Feb 03 2019 Fedora Release Engineering - 3.1.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/tpm2_getmanufc-fix-OSSL-build-warnings.patch b/tpm2_getmanufc-fix-OSSL-build-warnings.patch deleted file mode 100644 index 18897b0..0000000 --- a/tpm2_getmanufc-fix-OSSL-build-warnings.patch +++ /dev/null @@ -1,89 +0,0 @@ -From e43831512dad43ec5537d30911dba5f4c36fef59 Mon Sep 17 00:00:00 2001 -From: William Roberts -Date: Wed, 17 Oct 2018 08:27:11 -0700 -Subject: [PATCH] tpm2_getmanufc: fix OSSL build warnings -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Fix the following reported error: - -In file included from tools/tpm2_getmanufec.c:42:0: -tools/tpm2_getmanufec.c: In function ‘Base64Encode’: -/home/travis/build/AndreasFuchsSIT/tpm2-tss-engine/tpm2-tools/../installdir/usr/local/include/openssl/bio.h:596:34: error: value computed is not used [-Werror=unused-value] - # define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL) - ^ -tools/tpm2_getmanufec.c:290:5: note: in expansion of macro ‘BIO_flush’ - BIO_flush(bio); - ^ -/home/travis/build/AndreasFuchsSIT/tpm2-tss-engine/tpm2-tools/../installdir/usr/local/include/openssl/bio.h:589:34: error: value computed is not used [-Werror=unused-value] - # define BIO_set_close(b,c) (int)BIO_ctrl(b,BIO_CTRL_SET_CLOSE,(c),NULL) - ^ -tools/tpm2_getmanufec.c:292:5: note: in expansion of macro ‘BIO_set_close’ - BIO_set_close(bio, BIO_NOCLOSE); - ^ -cc1: all warnings being treated as errors -make: *** [tools/tpm2_getmanufec.o] Error 1 -make: *** Waiting for unfinished jobs.... - -Fixes: #1200 - -Signed-off-by: William Roberts ---- - tools/tpm2_getmanufec.c | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/tools/tpm2_getmanufec.c b/tools/tpm2_getmanufec.c -index 6ddf31eee5d..89702f9c78a 100644 ---- a/tools/tpm2_getmanufec.c -+++ b/tools/tpm2_getmanufec.c -@@ -274,6 +274,7 @@ char *Base64Encode(const unsigned char* buffer) - { - BIO *bio, *b64; - BUF_MEM *bufferPtr; -+ char *final_string = NULL; - - LOG_INFO("Calculating the Base64Encode of the hash of the Endorsement Public Key:"); - -@@ -287,9 +288,19 @@ char *Base64Encode(const unsigned char* buffer) - bio = BIO_push(b64, bio); - BIO_set_flags(bio, BIO_FLAGS_BASE64_NO_NL); - BIO_write(bio, buffer, SHA256_DIGEST_LENGTH); -- BIO_flush(bio); -+ int rc = BIO_flush(bio); -+ if (rc < 0) { -+ LOG_ERR("BIO_flush() failed"); -+ goto bio_out; -+ } -+ - BIO_get_mem_ptr(bio, &bufferPtr); -- BIO_set_close(bio, BIO_NOCLOSE); -+ -+ rc = BIO_set_close(bio, BIO_NOCLOSE); -+ if (rc < 0) { -+ LOG_ERR("BIO_set_close() failed"); -+ goto bio_out; -+ } - - /* these are not NULL terminated */ - char *b64text = bufferPtr->data; -@@ -305,8 +316,6 @@ char *Base64Encode(const unsigned char* buffer) - } - } - -- char *final_string = NULL; -- - CURL *curl = curl_easy_init(); - if (curl) { - char *output = curl_easy_escape(curl, b64text, len); -@@ -317,6 +326,7 @@ char *Base64Encode(const unsigned char* buffer) - } - curl_easy_cleanup(curl); - curl_global_cleanup(); -+bio_out: - BIO_free_all(bio); - - /* format to a proper NULL terminated string */ --- -2.19.2 - diff --git a/tpm2_rsaencrypt-fix-example-in-man-page.patch b/tpm2_rsaencrypt-fix-example-in-man-page.patch deleted file mode 100644 index 313d92a..0000000 --- a/tpm2_rsaencrypt-fix-example-in-man-page.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d9a30001c702d2e18378166ed6a13802fdf40b84 Mon Sep 17 00:00:00 2001 -From: Joshua Lock -Date: Fri, 19 Oct 2018 11:36:31 +0100 -Subject: [PATCH] tpm2_rsaencrypt: fix example in man page - -The -I option was removed and became an argument - -Signed-off-by: Joshua Lock ---- - man/tpm2_rsaencrypt.1.md | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/man/tpm2_rsaencrypt.1.md b/man/tpm2_rsaencrypt.1.md -index e213180ab52..638e533471b 100644 ---- a/man/tpm2_rsaencrypt.1.md -+++ b/man/tpm2_rsaencrypt.1.md -@@ -55,7 +55,7 @@ The key referenced by keyHandle is **required** to be: - # EXAMPLES - - ``` --tpm2_rsaencrypt -k 0x81010001 -I plain.in -o encrypted.out -+tpm2_rsaencrypt -k 0x81010001 -o encrypted.out plain.in - ``` - - # RETURNS --- -2.19.2 -