summaryrefslogtreecommitdiff
path: root/app-crypt/tpm2-tools/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-10-08 23:06:07 +0100
committerV3n3RiX <venerix@koprulu.sector>2021-10-08 23:06:07 +0100
commite23a08d0c97a0cc415aaa165da840b056f93c997 (patch)
tree4c5f7db60483518201fef36f8cc0712789a08db2 /app-crypt/tpm2-tools/files
parent391b5b359a346aff490103da7dddc85047f83830 (diff)
gentoo resync : 08.10.2021
Diffstat (limited to 'app-crypt/tpm2-tools/files')
-rw-r--r--app-crypt/tpm2-tools/files/tpm2-tools-5.1.1-fix-tpm-checkquote.patch34
-rw-r--r--app-crypt/tpm2-tools/files/tpm2-tools-5.2-testparms-fix-condition-for-negative-test.patch33
2 files changed, 33 insertions, 34 deletions
diff --git a/app-crypt/tpm2-tools/files/tpm2-tools-5.1.1-fix-tpm-checkquote.patch b/app-crypt/tpm2-tools/files/tpm2-tools-5.1.1-fix-tpm-checkquote.patch
deleted file mode 100644
index 73fb0e3f487a..000000000000
--- a/app-crypt/tpm2-tools/files/tpm2-tools-5.1.1-fix-tpm-checkquote.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 3d7edb1c70cba6c34c71c9b856c07b8adcebb15c Mon Sep 17 00:00:00 2001
-From: Alberto Planas <aplanas@suse.com>
-Date: Thu, 17 Jun 2021 11:07:25 +0200
-Subject: [PATCH] tpm2_checkquote: fix uninitialized variable
-
-The variable `temp_pcrs` is uninitialized, and later partially
-uninitialized when reading the selection data from file.
-
-When activating lto optimizations, this bug presents itself showing an
-error during the read of the quote:
-
-ERROR: Malformed PCR file, pcr count cannot be greater than 32, got: ...
-
-Fixes: #2767
-
-Co-authored-by: Martin Liska <marxin.liska@gmail.com>
-Signed-off-by: Alberto Planas <aplanas@suse.com>
----
- tools/misc/tpm2_checkquote.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/misc/tpm2_checkquote.c b/tools/misc/tpm2_checkquote.c
-index 531508579..8d780f111 100644
---- a/tools/misc/tpm2_checkquote.c
-+++ b/tools/misc/tpm2_checkquote.c
-@@ -376,7 +376,7 @@ static tool_rc init(void) {
- TPM2B_ATTEST *msg = NULL;
- TPML_PCR_SELECTION pcr_select;
- tpm2_pcrs *pcrs;
-- tpm2_pcrs temp_pcrs;
-+ tpm2_pcrs temp_pcrs = {};
- tool_rc return_value = tool_rc_general_error;
-
- msg = message_from_file(ctx.msg_file_path);
diff --git a/app-crypt/tpm2-tools/files/tpm2-tools-5.2-testparms-fix-condition-for-negative-test.patch b/app-crypt/tpm2-tools/files/tpm2-tools-5.2-testparms-fix-condition-for-negative-test.patch
new file mode 100644
index 000000000000..e1094647bdfd
--- /dev/null
+++ b/app-crypt/tpm2-tools/files/tpm2-tools-5.2-testparms-fix-condition-for-negative-test.patch
@@ -0,0 +1,33 @@
+From 3d80fad66694ad14a58dd89204a25e9248c4ab0c Mon Sep 17 00:00:00 2001
+From: Jonas Witschel <git@diabonas.de>
+Date: Wed, 29 Sep 2021 17:08:07 +0200
+Subject: [PATCH] testparms: fix condition for negative test
+
+Commit e858dec76686bb4c42e74e0984b433231e530f93 ("testparms: ensure curve not
+supported before negative test") is supposed to ensure that the negative test
+is run only if ecc521 is *not* supported, but instead it runs the negative test
+if ecc521 is *available*. This worked anyway for libtpms < 0.9.0 because camellia
+was not supported, but since libtpms 0.9.0 added support for this algorithm, the
+test suite fails now with swtpm.
+
+Signed-off-by: Jonas Witschel <git@diabonas.de>
+---
+ test/integration/tests/testparms.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/integration/tests/testparms.sh b/test/integration/tests/testparms.sh
+index 8c3548e5..a587a60a 100644
+--- a/test/integration/tests/testparms.sh
++++ b/test/integration/tests/testparms.sh
+@@ -63,7 +63,7 @@ else
+ fi
+
+ # Attempt to specify a suite that is not supported (error from TPM)
+-if tpm2 getcap ecc-curves | grep -q TPM2_ECC_NIST_P521; then
++if ! tpm2 getcap ecc-curves | grep -q TPM2_ECC_NIST_P521; then
+ if tpm2 testparms "ecc521:ecdsa:camellia" &>/dev/null; then
+ echo "tpm2 testparms succeeded while it shouldn't or TPM failed"
+ exit 1
+--
+2.32.0
+