summaryrefslogtreecommitdiff
path: root/dev-python/tpm2-pytss/files/tpm2-pytss-2.1.0-test-disable-pcr_set_auth_value-and-pcr_set_auth_pol.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/tpm2-pytss/files/tpm2-pytss-2.1.0-test-disable-pcr_set_auth_value-and-pcr_set_auth_pol.patch')
-rw-r--r--dev-python/tpm2-pytss/files/tpm2-pytss-2.1.0-test-disable-pcr_set_auth_value-and-pcr_set_auth_pol.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/dev-python/tpm2-pytss/files/tpm2-pytss-2.1.0-test-disable-pcr_set_auth_value-and-pcr_set_auth_pol.patch b/dev-python/tpm2-pytss/files/tpm2-pytss-2.1.0-test-disable-pcr_set_auth_value-and-pcr_set_auth_pol.patch
new file mode 100644
index 000000000000..6e99688b76ba
--- /dev/null
+++ b/dev-python/tpm2-pytss/files/tpm2-pytss-2.1.0-test-disable-pcr_set_auth_value-and-pcr_set_auth_pol.patch
@@ -0,0 +1,40 @@
+From c55775c30c06bf3a3066b4047cb51cb42f1e403d Mon Sep 17 00:00:00 2001
+From: Erik Larsson <who+github@cnackers.org>
+Date: Sat, 6 Jan 2024 06:25:54 +0100
+Subject: [PATCH 2/3] test: disable pcr_set_auth_value and pcr_set_auth_policy
+ tests for swtpm
+
+Since [commit][1] in libtpms setting auth values/policies for PCRs are no longer supported.
+
+[1]: https://github.com/stefanberger/libtpms/commit/af4fc0e66df6d012c61aee7c418148fb261d77a9
+
+Signed-off-by: Erik Larsson <who+github@cnackers.org>
+---
+ test/test_esapi.py | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/test/test_esapi.py b/test/test_esapi.py
+index 269a43b..e0b6d35 100644
+--- a/test/test_esapi.py
++++ b/test/test_esapi.py
+@@ -3585,6 +3585,8 @@ class TestEsys(TSS2_EsapiTest):
+ self.ectx.pcr_allocate(pcrsels, session3=object())
+
+ def test_pcr_set_auth_policy(self):
++ if getattr(self.tcti, "name", "") == "swtpm":
++ self.skipTest("pcr_set_auth_policy not supported by swtpm")
+
+ policy = b"0123456789ABCDEF0123456789ABCDEF"
+ self.ectx.pcr_set_auth_policy(policy, TPM2_ALG.SHA256, ESYS_TR.PCR20)
+@@ -3630,6 +3632,8 @@ class TestEsys(TSS2_EsapiTest):
+ )
+
+ def test_pcr_set_auth_value(self):
++ if getattr(self.tcti, "name", "") == "swtpm":
++ self.skipTest("pcr_set_auth_value not supported by swtpm")
+
+ self.ectx.pcr_set_auth_value(ESYS_TR.PCR20, b"password")
+ self.ectx.tr_set_auth(ESYS_TR.PCR20, b"password")
+--
+2.43.0
+