1 |
commit: 90e9e0dc896c27dde200b18d51d0fff7656258d4 |
2 |
Author: Christopher Byrne <salah.coronya <AT> gmail <DOT> com> |
3 |
AuthorDate: Tue Oct 5 01:27:44 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 6 10:56:17 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90e9e0dc |
7 |
|
8 |
app-crypt/tpm2-tools: Fix broken test exposed in libtpms-0.9.0 |
9 |
|
10 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
11 |
Signed-off-by: Christopher Byrne <salah.coronya <AT> gmail.com> |
12 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
13 |
|
14 |
...testparms-fix-condition-for-negative-test.patch | 33 ++++++++++++++++++++++ |
15 |
app-crypt/tpm2-tools/tpm2-tools-5.2.ebuild | 1 + |
16 |
2 files changed, 34 insertions(+) |
17 |
|
18 |
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 |
19 |
new file mode 100644 |
20 |
index 00000000000..e1094647bdf |
21 |
--- /dev/null |
22 |
+++ b/app-crypt/tpm2-tools/files/tpm2-tools-5.2-testparms-fix-condition-for-negative-test.patch |
23 |
@@ -0,0 +1,33 @@ |
24 |
+From 3d80fad66694ad14a58dd89204a25e9248c4ab0c Mon Sep 17 00:00:00 2001 |
25 |
+From: Jonas Witschel <git@××××××××.de> |
26 |
+Date: Wed, 29 Sep 2021 17:08:07 +0200 |
27 |
+Subject: [PATCH] testparms: fix condition for negative test |
28 |
+ |
29 |
+Commit e858dec76686bb4c42e74e0984b433231e530f93 ("testparms: ensure curve not |
30 |
+supported before negative test") is supposed to ensure that the negative test |
31 |
+is run only if ecc521 is *not* supported, but instead it runs the negative test |
32 |
+if ecc521 is *available*. This worked anyway for libtpms < 0.9.0 because camellia |
33 |
+was not supported, but since libtpms 0.9.0 added support for this algorithm, the |
34 |
+test suite fails now with swtpm. |
35 |
+ |
36 |
+Signed-off-by: Jonas Witschel <git@××××××××.de> |
37 |
+--- |
38 |
+ test/integration/tests/testparms.sh | 2 +- |
39 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
40 |
+ |
41 |
+diff --git a/test/integration/tests/testparms.sh b/test/integration/tests/testparms.sh |
42 |
+index 8c3548e5..a587a60a 100644 |
43 |
+--- a/test/integration/tests/testparms.sh |
44 |
++++ b/test/integration/tests/testparms.sh |
45 |
+@@ -63,7 +63,7 @@ else |
46 |
+ fi |
47 |
+ |
48 |
+ # Attempt to specify a suite that is not supported (error from TPM) |
49 |
+-if tpm2 getcap ecc-curves | grep -q TPM2_ECC_NIST_P521; then |
50 |
++if ! tpm2 getcap ecc-curves | grep -q TPM2_ECC_NIST_P521; then |
51 |
+ if tpm2 testparms "ecc521:ecdsa:camellia" &>/dev/null; then |
52 |
+ echo "tpm2 testparms succeeded while it shouldn't or TPM failed" |
53 |
+ exit 1 |
54 |
+-- |
55 |
+2.32.0 |
56 |
+ |
57 |
|
58 |
diff --git a/app-crypt/tpm2-tools/tpm2-tools-5.2.ebuild b/app-crypt/tpm2-tools/tpm2-tools-5.2.ebuild |
59 |
index 87c3b2f5697..f5db2002958 100644 |
60 |
--- a/app-crypt/tpm2-tools/tpm2-tools-5.2.ebuild |
61 |
+++ b/app-crypt/tpm2-tools/tpm2-tools-5.2.ebuild |
62 |
@@ -40,6 +40,7 @@ BDEPEND="virtual/pkgconfig |
63 |
|
64 |
PATCHES=( |
65 |
"${FILESDIR}/${PN}-5.1.1-no-efivar-automagic.patch" |
66 |
+ "${FILESDIR}/${PN}-5.2-testparms-fix-condition-for-negative-test.patch" |
67 |
) |
68 |
|
69 |
src_prepare() { |