|
|
14a82e |
From 0789bf264a108c4718875a050d00b1fdee4478b7 Mon Sep 17 00:00:00 2001
|
|
|
14a82e |
From: Jonas Witschel <git@diabonas.de>
|
|
|
14a82e |
Date: Wed, 29 Sep 2021 17:08:07 +0200
|
|
|
14a82e |
Subject: [PATCH] testparms: fix condition for negative test
|
|
|
14a82e |
Content-type: text/plain
|
|
|
14a82e |
|
|
|
14a82e |
Commit e858dec76686bb4c42e74e0984b433231e530f93 ("testparms: ensure curve not
|
|
|
14a82e |
supported before negative test") is supposed to ensure that the negative test
|
|
|
14a82e |
is run only if ecc521 is *not* supported, but instead it runs the negative test
|
|
|
14a82e |
if ecc521 is *available*. This worked anyway for libtpms < 0.9.0 because camellia
|
|
|
14a82e |
was not supported, but since libtpms 0.9.0 added support for this algorithm, the
|
|
|
14a82e |
test suite fails now with swtpm.
|
|
|
14a82e |
|
|
|
14a82e |
Signed-off-by: Jonas Witschel <git@diabonas.de>
|
|
|
14a82e |
---
|
|
|
14a82e |
test/integration/tests/testparms.sh | 2 +-
|
|
|
14a82e |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
14a82e |
|
|
|
14a82e |
diff --git a/test/integration/tests/testparms.sh b/test/integration/tests/testparms.sh
|
|
|
14a82e |
index 8c3548e58f39..a587a60a34cf 100644
|
|
|
14a82e |
--- a/test/integration/tests/testparms.sh
|
|
|
14a82e |
+++ b/test/integration/tests/testparms.sh
|
|
|
14a82e |
@@ -63,7 +63,7 @@ else
|
|
|
14a82e |
fi
|
|
|
14a82e |
|
|
|
14a82e |
# Attempt to specify a suite that is not supported (error from TPM)
|
|
|
14a82e |
-if tpm2 getcap ecc-curves | grep -q TPM2_ECC_NIST_P521; then
|
|
|
14a82e |
+if ! tpm2 getcap ecc-curves | grep -q TPM2_ECC_NIST_P521; then
|
|
|
14a82e |
if tpm2 testparms "ecc521:ecdsa:camellia" &>/dev/null; then
|
|
|
14a82e |
echo "tpm2 testparms succeeded while it shouldn't or TPM failed"
|
|
|
14a82e |
exit 1
|
|
|
14a82e |
--
|
|
|
14a82e |
2.35.3
|
|
|
14a82e |
|