python-tpm2-pytss/0001-tests-Use-p384-instead-of-p192.patch
Štěpán Horáček 79e43659a5 Rebase to 2.3.0
Resolves: RHEL-45223

Signed-off-by: Štěpán Horáček <shoracek@redhat.com>
2024-08-08 16:28:25 +02:00

37 lines
1.2 KiB
Diff

From 3cd9d2e5f9b4760c4c178c6e6c23247249012611 Mon Sep 17 00:00:00 2001
From: Jakub Jelen <jjelen@redhat.com>
Date: Wed, 3 Jul 2024 18:26:34 +0200
Subject: [PATCH 1/2] tests: Use p384 instead of p192
The p192 is not available on all platforms, such as Fedora.
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
---
test/test_cryptography.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/test_cryptography.py b/test/test_cryptography.py
index ed3dd6f..7f1bad5 100644
--- a/test/test_cryptography.py
+++ b/test/test_cryptography.py
@@ -297,14 +297,14 @@ class TestCryptography(TSS2_EsapiTest):
)
privkey = tpm_ecc_private_key(self.ectx, handle)
- peer_key = ec.generate_private_key(ec.SECP192R1())
+ peer_key = ec.generate_private_key(ec.SECP384R1())
peer_public_key = peer_key.public_key()
with self.assertRaises(ValueError) as e:
privkey.exchange(ec.ECDH(), peer_public_key)
self.assertEqual(
str(e.exception),
- "curve mismatch for peer key, got secp192r1, expected secp256r1",
+ "curve mismatch for peer key, got secp384r1, expected secp256r1",
)
def test_ecc_no_sign(self):
--
2.45.2