public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ionen Wolkens" <ionen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tools/files/, app-crypt/tpm2-tools/
Date: Wed,  6 Oct 2021 10:57:45 +0000 (UTC)	[thread overview]
Message-ID: <1633517777.90e9e0dc896c27dde200b18d51d0fff7656258d4.ionen@gentoo> (raw)

commit:     90e9e0dc896c27dde200b18d51d0fff7656258d4
Author:     Christopher Byrne <salah.coronya <AT> gmail <DOT> com>
AuthorDate: Tue Oct  5 01:27:44 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Oct  6 10:56:17 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90e9e0dc

app-crypt/tpm2-tools: Fix broken test exposed in libtpms-0.9.0

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Christopher Byrne <salah.coronya <AT> gmail.com>
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 ...testparms-fix-condition-for-negative-test.patch | 33 ++++++++++++++++++++++
 app-crypt/tpm2-tools/tpm2-tools-5.2.ebuild         |  1 +
 2 files changed, 34 insertions(+)

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 00000000000..e1094647bdf
--- /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
+

diff --git a/app-crypt/tpm2-tools/tpm2-tools-5.2.ebuild b/app-crypt/tpm2-tools/tpm2-tools-5.2.ebuild
index 87c3b2f5697..f5db2002958 100644
--- a/app-crypt/tpm2-tools/tpm2-tools-5.2.ebuild
+++ b/app-crypt/tpm2-tools/tpm2-tools-5.2.ebuild
@@ -40,6 +40,7 @@ BDEPEND="virtual/pkgconfig
 
 PATCHES=(
 	"${FILESDIR}/${PN}-5.1.1-no-efivar-automagic.patch"
+	"${FILESDIR}/${PN}-5.2-testparms-fix-condition-for-negative-test.patch"
 )
 
 src_prepare() {


             reply	other threads:[~2021-10-06 10:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-06 10:57 Ionen Wolkens [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-04-16  2:34 [gentoo-commits] repo/gentoo:master commit in: app-crypt/tpm2-tools/files/, app-crypt/tpm2-tools/ Sam James
2023-09-09 13:17 David Seifert
2021-10-04 14:24 Ionen Wolkens
2021-09-08  6:46 Sam James
2021-01-20 14:13 Joonas Niilola
2021-01-20 14:13 Joonas Niilola
2020-06-24 14:29 Joonas Niilola
2020-06-24 14:29 Joonas Niilola

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1633517777.90e9e0dc896c27dde200b18d51d0fff7656258d4.ionen@gentoo \
    --to=ionen@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox