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
blob: 6e99688b76bad34570071d45bd63e01459ee05c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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